2019-10-24 04:43 PM
I have written an external loader for a device connected to my STM32F103 and I have debugged it and it works for the most part. Init(), Erase(), SectorErase(), Read() and Write() are all working ok, except when trying to program a large file. My external device is fairly slow to program (a couple of minutes) but it looks like STM32CubeProgrammer is interrupting the programming after about 30 seconds. Is there some sort of timeout in STM32CubeProgrammer?
I have a debug version of my project setup (standalone) and call Init(), then Write() with the same data and it takes a couple of minutes but it gets there. I have replicated the stack space and location (I got that from the STM32CubeProgrammer log) of 1024 bytes and located right above the code and data in RAM.
Any ideas if there is a timeout in STM32CubeProgrammer on the write cycle?
2019-10-24 04:58 PM
2019-10-24 07:23 PM
I was just trolling through the log and it a sector erase is done, and then the file is broken up into chunks.
From my elf file:
449: 20000e85 110 FUNC GLOBAL DEFAULT 4 Init
450: 20000ef3 32 FUNC GLOBAL DEFAULT 4 Read
451: 20000f13 32 FUNC GLOBAL DEFAULT 4 Write
452: 20000f33 26 FUNC GLOBAL DEFAULT 4 MassErase
453: 20000f4d 30 FUNC GLOBAL DEFAULT 4 SectorErase
The first call of the Write() function from the log is:
Write( 0, 0xA600, 0x20030C0 ); // int Write( uint32_t Address, uint32_t Size, uint8_t * buffer )
The next call is exactly the same, the buffer address has not been incremented:
Write( 0, 0xA600, 0x20030C0 );
which is just writing over the previously written data in my external device.