2002-10-03 01:13 PM
2002-09-19 02:09 AM
Hi!
I've got a problem, I would like to write to the flash while the application is executing. I have written a procedure that I copy to RAM and the jump to that procedure in RAM. This part seems to work fine, I've been able to light some led from the procedure. When trying to write to Flash, I followed the instructions in AN 1179 the RAM-procedure looks like this. EEXCSR=EEXCSR|0x02; //Set LAT=1 _asm(''LD A,#13''); _asm(''LD $F000,A''); EEXCSR=EEXCSR|0x01; //Set PGM=1 I think it will write 13 to F000 in the flash. Does anyone know why it doesn't work?2002-09-19 03:48 AM
What part are you using ?
The appnote you refer to is for CFlash parts which do not support 'In Application Programming' (IAP). If you require the ability to self-reprogram then look at XFlash or HDFlash devices. Programming Manuals available: http://us.st.com/stonline/books/pdf/docs/8184.pdf http://us.st.com/stonline/books/pdf/docs/4020.pdf Regards Spen2002-09-19 07:34 PM
Programming manuals are also available here:
Home page -> quick links -> Families - ST7 [ This message was edited by: daguerre on 20-09-2002 08:05 ]2002-09-24 06:16 AM
I am designing in an ST72C314J4T6 device.
I have a similar requirement, to be able to download code upgrades via the Uart. After reading the App note mentioned I can't see why this can't be done. My understanding is that the ISP protocol is microcoded into the ST7 and upon the device being put into ISP mode, this loads a bootloader into RAM over the ISP interface and runs it. The bootloader itself, which is obviously configurable, is the part in all this that burns the flash. If I include a custom bootloader in my application code image which can receive bytes from the Uart and burn the flash, surely to upgrade in the field all I have to do is load this into ram and run it. A PC based App can send the upgrade to its COM port. When the board is new I can simply ISP the app+bootloader with a programming tool at the factory. Is this correct ? If not why does the App note bang on about uploading code form SPI or Uart ? What is the point if you need to connect the ISP anyway ? I would be interested to hear from anyone who has done this with a 'C' flash part2002-10-03 01:13 PM
A classical reason for IAP support is usually the number of bank of memory available in a flash microcontroller - The ST72Cxxx familly has only one bank of flash -
BUT this reason does not stand for the ST72Cxxx because they have EEPROM memory - byte by byte eraze - and not real flash. - full page eraze only, that would let the memory empty in case of programing failure - For the ST72C familly, the reason is just robustness: the flash memory is write protected in normal mode and can be programmed only if booted in ISP mode. Have a look at the ST72F324 familly if you need upgrade in the field capability.