Port IoT code to Murata ZY (DA14580)

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
gme_johannes
Offline
Last seen:1 week 4 days ago
Joined:2017-12-22 10:09
Port IoT code to Murata ZY (DA14580)

I am working with IoT Sensor Kit SDK v5.160.1.19 and want to port the project to the Murata ZY module, which incorporates DA14580.

I have attached W25X20 flash to the bootable SPI bus (AN-B-023 Table 3).
In Keil, I have removed __DA14583__ from the preprocessor symbols.

I have made the following changes to the code:

user_periph_setup.h
#define SPI_FLASH_DEFAULT_SIZE --> changed to 262144

user_periph_setup.c
spi_driver_cs_pad.* --> changed to SPI flash CE pin/port on my board

user_platform.h
#define SPI_FLASH_* --> changed to SPI flash ports on my board
#define BMI* --> changed to same ports (SPI bus is shared between sensors and flash)
#define BMM* --> changed to same ports (SPI bus is shared between sensors and flash)
#define SPI_*_PIN --> changed to same ports
#define da14583_spi_flash * - >更改为同一个端口
#define DA14583_SPI_FLASH_SIZE --> changed to 0x40000

gpio.c
RESERVE_GPIO(DA14583_INTERNAL_FLASH_SPI_*) --> changed to SPI flash ports on my board

此外,我相应地改变了中断引脚。
Unfortunately after flashing the ROM (with "bootable" enabled) the device does not start advertising.

Questions:
(1) What other steps am I missing to port the code successfully to DA14580?
(2) The sensors are not yet connected to SPI (I have left their CS unconnected), can this be a problem? Will the code halt before advertising BT?
(3) Do I have to make changes in the code regarding battery/power? IoT Sensor kit is operating in BOOST mode from coin cell, I am operating from 3.3V.
(4) Is there recommended Kyle project for first bring-up? I am thinking of a firmware which will just output some text through the UART such that I can verify successful booting from the SPI flash. I have seen in Training7 of the Prototype Bring-up Guide . Is the empty_peripheral_template suitable for such a test, or is this just suitable to test BT?

Best regards
Johannes

Device:
PM_DIALOG.
Offline
Last seen:15 hours 32 min ago
Staff
Joined:2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

  1. 这不是我们可以提供指导的东西,这种移植尚未从对话中尝试,因为使用580的IOT没有参考设计。您要做的是调试代码并检查代码摊位的位置,刚刚改变闪光设置的事实并不意味着FW将在580上运行,例如,您对传感器保持了相同的引脚?在尝试与外部设备通信时,代码可能会在该点处停止。
  2. 是的,这是一个问题,但如果你不调试代码,你将无法知道究竟发生了什么。FW与来自User_Wrbl_App_On_Init()函数的传感器通信。
  3. IOT参考设计使用了583个设备,该设备无法在Boost模式下操作,但仅限于降压,因此您不会有任何问题。
  4. You can use the peripheral_examples and the UART example, as soon as you power the device and have attached the proper wires for accessing the UART then you should see the device printing.

Thanks, PM_Dialog

gme_johannes
Offline
Last seen:1 week 4 days ago
Joined:2017-12-22 10:09
Hi,

Hi,
thank you for your answer. I understand you can not provide detailed guidance, I will try it on my own and already had some further success.
I have the code running now such that I can discover it with a BT scanner.

关于之前的问题:
(1) I have also changed GPIOs for the sensors, I forgot to mention it. However they are not connected at the moment.
(2) Thank you, I have identified what you meant.
(3) Misunderstanding from my side, I thought it was operating from a 1.5V cell, I see now that it is in fact 3.0V. Thank you.
(4) Unfortunately Kyle is showing only "boxes" in the UART terminal.
这也是case when I try it with your original DA14583 IoT sensor with original firmware (v5.160.1.19) when I press reset (probably just a glitch from booting).
通过UART连接本身不是问题,例如,我可以通过它访问和编程(因此我认为波特率正确地设置为智能片段中的56k)。
Is there no output on UART in the default project? I had assume that something like this "DBG_MSG("ADV UNDR COMPLT\r\n");" will be output to UART as default.

Best regards
Johannes

PM_DIALOG.
Offline
Last seen:15 hours 32 min ago
Staff
Joined:2018-02-08 11:03
Hi gme_johannes

Hi gme_johannes

我无法了解你的最后一个陈述的意思“Kyle is showing only boxes in the UART terminal”.Could you please explain little bit more what you mean exactly? As If I understand correctly, you mean that if you attach the UART pins to an FTDI cable and open a terminal, you only get that output? If this is the problem, you are able to see the bootloader executing, so there is no firmware downloaded to your device. You have requested in your previous post something basic, a firmware that will just print out a few characters over the UART, if you download the indicated firmware you will be able to see what you want to print. Regarding printing from the IoT project, you should define the CFG_PRINTF in the da1458x_config_basic.h file and attach an FTDI cable on the corresponding pins of the CIB board. After that configuration, you will be able to print.

Thanks, PM_Dialog