2018-03-05 01:16 AM
Hello,
I would like to IAP using STM32L073 controller in order to update my firmware from software when update is available. I had gone through several documents and found an application in cubemx folder example code with IAP main as named. I had taken as reference and updated to my custom board Usart peripherals and Button Tampering. I had successfully updated the code and works fine as expected able to see menu to upload file and download file using tera term ymodem protocol. As I had attached an error file IAP_Error.png. where i could transfer only few bytes of data from serial port using ymodem protocol and then after few bytes it's no more writes the data in to flash. other problem I am facing during flash is that I get debug error and comes out of debug mode. This is because of the unable to erase flash. I have no idea how to move forward and where did I commit this mistake. Kindly support me in this aspect. I hereby attach IAP_flash.rar file as the original source code. and STM32L73Z_EVAL.bin as the binary file to upload to flash.@&sharpstm32&sharpIAP&sharpNucleo&sharpFlash&sharpSTM32l0♯
#stm32-iap #stm32-l4 #flash-storage #stm32l0-uart2018-03-05 06:03 AM
Not familiar with the custom design
If you have a secondary serial connection you can use that for debugging.
The debugger dropping could occur if you go into a low power or sleep mode, reconfigure the debug pins, or erase the code you're actually running. Check that your loader implementation fits in the memory below the starting point of the application code address.
You could use the ST-LINK Utilities to download the memory content and compare/contrast that with the data you started with.
2018-03-26 04:06 AM
Hello Clive,
I had tried to Debug on my Custom board, But problem i found is that its unable to erase the flash that is at in flash_if.c
/* erase user application area */
FLASH_If_Erase(APPLICATION_ADDRESS);Here is the place it gets stuck when i try to ignore this then i could only see the file name and size been seen in the data packet received from y-modem that is here.
ramsource = (uint32_t) & aPacketData[PACKET_DATA_INDEX];
What would be the problem when i try to erase it. one thing is that i tried to disable write protection too but no use. Kindly could you please provide where is the problem.
2018-03-26 08:59 AM
The most likely issue is erasing the code you are running. You should check how big your code is via the .MAP file.
Single stepping and breakpointing is not recommended. If the USART is in use consider using the SWV channel to output real-time diagnostic/telemetry information.
If the Erase doesn't work the Write is going to fail as overwriting memory is not supported. The memory you are writing needs to be blank.