what will happen? when I press the reset button under SW environment mode

⚠️
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 https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
jame0769
Offline
Last seen: 5 months 4 weeks ago
Joined: 2021-01-07 12:13
what will happen? when I press the reset button under SW environment mode

I am a new programer to "PAN1740A bluetooth module",  core of  PAN1740A is a DA14585 mcu chip.

On the data sheet, it's said this mcu have 3 mode."normal OTP" mode was very easy to understand, what confuses me was "Development" mode.

Below is qutoe from data sheet: "During development mode phase application code is developed using the ARM Cortex-M0 SW environment. The compiled code is downloaded into the System RAM or any retention RAMs by means of SWD (JTAG) or any serial interface (e.g. UART). Address 0x00 is remapped to the physical memory that contains the code and the CPU is configured to reset and execute code from the remapped device. This mode enables application development, debugging and on-the-fly testing."

Here is my question:  when device was under "development mode", because all the app code exist only in RAM, Once I power down the device, alll the code in device will disappear, when I power up the  device again, I need to download the code again?

 

Lack of experienment borad on hand, i just wondering...

Device: 
PM_Dialog
Offline
Last seen: 2 days 9 hours ago
Staff
Joined: 2018-02-08 11:03
Hi jame0769,

Hi jame0769,

Thanks for your question. Please check the BootROM Sequence from the datasheet. When the device boots, the bootrom code reads the application flag from the OTP. If that flags are programmed, then it boot from the OTP. Keep in mind that OTP stands for One Time Programmable, thus you can’t erase and re-write the OTP multiple times, but you can only flip the bits that are still set to 0 and turn them to 1. So, this should be done the product it ready and the OTP should be burnt. This is the normal mode.

In development stage, the application flash should not be programmed. In that stage, the OTP is blank and the chip can boot from different serial interfaces such as UART, SPI Master/Slave and I2C and the application code is downloaded to System-RAM and then the device boots.

Since you are a new programmer, you should use the development mode so that you can debug the code.

If the code is stored into System-RAM, after resetting or power-down the DA14585, then the code is lost, so you should reprogram it. If you would like to retain the code, you should burn the SPI Flash, so when the chips resets or power-up, then it will boot again.

To burn the SPI flash, please use the SmartSnippets Toolbox V5.0.14 for Windows OS .

http://lpccs-docs.dialog-semiconductor.com/UM-B-083/tools/Board_Setup.html

http://lpccs-docs.dialog-semiconductor.com/UM-B-083/tools/SPIFlashProgrammer.html

Thanks, PM_Dialog

jame0769
Offline
Last seen: 5 months 4 weeks ago
Joined: 2021-01-07 12:13
Hi PM_Dialog 

Hi PM_Dialog 

 Thanks for your answers!