2394069_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2394069_en-US

2394069_en-US

Boot uses C40 to erase and rewrite flash.

Hello, I'm having trouble writing to flash memory using the C40 chip in the bootloader. I'm writing a 300KB binary program, and it frequently fails at the 9th data packet (the second block), with only a 1/10 chance of succeeding completely. Could you please check if there's a problem with my C40 chip? The main program I'm writing...

Flash_UnlockSectorIfProtected ( cur_sector ) ;

DisableAllInterrupts () ;

DisEnableIrq1 () ;

if ( Flash_Write ( flash_write_addr + offset , & payload [ 2 ] , FIXED_PACKET_DATA_LEN ) != 0 ) {

EnableIrq1 () ;

EnableAllInterrupts () ;

}

EnableIrq1 () ;

EnableAllInterrupts () ;

Is there a problem with my use of Power_Ip_MC_ME_SocTriggerResetEvent(POWER_IP_DEST_RESET_MODE) for resetting? How can I prevent consecutive resets after 8 attempts, and what function should I use for jumps?

func = * ( uint32_t volatile * )( ADDR_APP + 0xC ) ;

func = * ( uint32_t volatile * )((( uint32_t ) func ) + 0x4 ) ;

func = (((( uint32_t ) func ) & 0xFFFFFFFF U )) ; // Reset_Handler+1 --> required to avoid hard fault

After resetting and jumping , will there be any residual data from the previous program? Is it necessary to clean up the RAM? If so , how? Thank you .

回复: boot使用C40擦写flash

Hi@ LJH1

Please provide me with a simple demo that can reproduce the problem so I can reproduce your issue. I don't need your complete product project or scattered driver files.

回复: boot使用C40擦写flash

RTD Company uses version 4.0.0 as standard.

标记 (1)
无评分
版本历史
最后更新:
昨天
更新人: