9 posts / 0 new
Last post
Joacimwe
Offline
Last seen: 3 years 3 weeks ago
Guru
Joined: 2014-01-14 06:45
Boot from I2C/EEPROM

Hi. I read in http://support.dialog-semiconductor.com/system/files/resources/AN-B-023%... in section 7.2 that I2C is not supported in the secondary bootloader. Is there any particular reason for this?

If we write the code to EEPROM and want to boot it from there, that means we have to have the OTP empty which would mean that our product can easily be misused by people that can easily boot their own code from UART?

JE_Dialog
Offline
Last seen: 1 year 1 month ago
Staff
Joined: 2013-12-05 14:02
Hi Joacimwe,  We implemented

Hi Joacimwe,  We implemented secondary bootloader on SPI FLash configuration for a particular wireless charging appplication to speed up boot time to be within A4WP system specification. It is possible to implement in I2C, its just we havent done that .

For second question : i need to check into one thing before replying to you on that....

BR JE_Dialog

JE_Dialog
Offline
Last seen: 1 year 1 month ago
Staff
Joined: 2013-12-05 14:02
Hello Joacimwe,

Hello Joacimwe,

Booting process with blank OTP: cannot force the device to only boot from UART. The booting sequence is setup in the bootrom. See table 1 from AN-B-001.

Booting process with secondary boot loader burnt in OTP:  YES, we can force to boot from UART.

BR JE_Dialog

huwjones
Offline
Last seen: 1 year 9 months ago
Joined: 2014-05-27 12:17
Dear Dialog,

Dear Dialog,
I am experiencing a problem with using Smart Snippets to set up boot code in a M24M01 i2C EEPROM. I am using a WLCSP daughter board with the Dev Kit and I am assuming that it is 01 silicon. When I try to program the EEPROM, the log gives the messages below. The SCL and SDA pins at the EEPROM are continuously active but I have not tried to analyze the content of the serial data. Do you have any idea what might be going on here ?

Thanks
[INFO @14-07-23 08:53:00] EEPROM Programmer: Successfully downloaded firmware file to DA14580.
[INFO @14-07-23 08:53:12] EEPROM Programmer: Firmware File C:\dialog\Projects\resources\flash_programmer.bin has been selected
[INFO @14-07-23 08:53:12] EEPROM Programmer: Connection to COM5 port has successfully opened.
[INFO @14-07-23 08:53:12] EEPROM Programmer: Started download procedure...
[ACTION @14-07-23 08:53:13] EEPROM Programmer: Please press the hardware reset button on the board to start the download process.
[INFO @14-07-23 08:53:18] EEPROM Programmer: Reset detected
[INFO @14-07-23 08:53:19] Booter: Successfully disconnected from port COM5.
[INFO @14-07-23 08:53:19] EEPROM Programmer: Successfully downloaded firmware file to DA14580.
[INFO @14-07-23 08:53:26] EEPROM Programmer: Setting offset to 32
[INFO @14-07-23 08:53:26] EEPROM Programmer: Started burning memory with 6372 bytes of data at address 0x00020.
[INFO @14-07-23 08:53:26] EEPROM Programmer: Connection to COM5 port has successfully opened.
[ERROR @14-07-23 08:53:36] EEPROM Programmer: Timeout while waiting to receive the most significant byte of packet length (10000 msecs)
[INFO @14-07-23 08:53:36] Booter: Successfully disconnected from port COM5.
[ERROR @14-07-23 08:53:36] EEPROM Programmer: Memory burning failed.

huwjones
Offline
Last seen: 1 year 9 months ago
Joined: 2014-05-27 12:17
Dear Dialog,

Dear Dialog,

Sorted - by setting the Smart Snippets connection to JTAG instead of UART. With this connection method programming the M24M01 works like a dream and I can boot a program from external memory. Perfect. I'll go back and find out what was going wrong with the UART connection another day. I am becoming a real fan of Smart Snippets!

Many thanks

mansonhui
Offline
Last seen: 3 years 3 weeks ago
Joined: 2014-07-15 10:33
Dear huwjones,

Dear huwjones,

I am using Smart Snippets and connect with JTAG, It can burn to I2C EEPROM.
After that, it still cannot boot form the EEPROM. It just read the data form EEPROM continuously.
More info, the offset in EEPROM memory is 0x20.

How to solve this problem?

Thanks!

huwjones
Offline
Last seen: 1 year 9 months ago
Joined: 2014-05-27 12:17
Dear Mansonhui,

Dear Mansonhui,
I did not see any problem with the DA14580 booting from external I2C once the data had been correctly programmed in the memory with SmartSnipets. I could use JTAG or UART connections to perform the programming but had to ensure that CTS/RTS lines were left disconnected on the Dialog Expert target board. I used the following memory connections :
P0_2 -> SCL, P0_3 -> SDA, all other pins of the M24M01 except Vcc grounded. I used 4K3 pull-ups on SCL & SDA. If you are to successfully read back the EEPROM contents within Smart Snippets I can only think that either the DA14580 boot sequence is priortizing a different boot source before it gets to the I2C scan or the I2C memory is unable to respond to the boot reads. Sorry I can't give you any positive answer but the 'continuous read' that you report is symptomatic of the code not having been programmed correctly.

Best wishes

mansonhui
Offline
Last seen: 3 years 3 weeks ago
Joined: 2014-07-15 10:33
Dear huwjones,

Dear huwjones,

Thank you for your reply.
I found out that if I press RESET button, DA14580 will be 'continuous read'. If I unplug and plug in usb power, DA14580 will read once then stop reading from EEPROM.
But in this state, it is still not work. LightBlue a test app in iphone cannot find it.

BRs

mansonhui
Offline
Last seen: 3 years 3 weeks ago
Joined: 2014-07-15 10:33
Dear Staff,

Dear Staff,

I also found that DA14580 don't boot from EEPROM completely and stop read program.
Let say, the program size is 0x5440, but it stop boot at EEPROM address 0x17xx. The 'stop address' is different everytime.

How to solve it?

Thank you!
BRs