DSPS software reset issue

4 posts / 0 new
Last post
bonjior
Offline
Last seen:5 years 4 months ago
Joined:2015-04-17 02:02
DSPS software reset issue

In the DSPS software of DA14580, do the software reset use the code shown below. But it doesn't work.
Who can help me to find the reason.

void Start_run_user_application(void);
__asm void sw_reset(void);

/**
****************************************************************************************
* @brief sw reset
****************************************************************************************
*/
__asm void sw_reset(void)
{
LDR r0,=0x20000000
LDR r1,[r0,#0]
MOV sp,r1
LDR r2,[r0,#4]
BX r2
}

/**
****************************************************************************************
* @brief Run the user application after receiving a binany from uart or reading the binary from a non volatile memory booting
****************************************************************************************
*/
void Start_run_user_application(void)
{
volatile unsigned short tmp;

if (*(volatile unsigned*)0x20000000 & 0x20000000)
{
tmp = GetWord16(SYS_CTRL_REG);
tmp&=~0x0003;
SetWord16(SYS_CTRL_REG,tmp);
sw_reset();
}
tmp = GetWord16(SYS_CTRL_REG);
tmp|=0x8000;
SetWord16(SYS_CTRL_REG,tmp);
}

Device:
MT_dialog
Offline
Last seen:1 hour 20 min ago
Staff
Joined:2015-06-08 11:34
Hi bonjior,

Hi bonjior,

Try using this function for reset: void platform_reset();

Thanks MT_dialog

bonjior
Offline
Last seen:5 years 4 months ago
Joined:2015-04-17 02:02
Thank you.

Thank you.
The code is downloaded into the sys ram, use the function plaform_reset can jump the code entry?

MT_dialog
Offline
Last seen:1 hour 20 min ago
Staff
Joined:2015-06-08 11:34
Hi bonjior,

Hi bonjior,

platform_reset后系统会跳转到the boot rom code.

Thanks MT_dialog