You would think that writing to FLASH would not be such a big thing. But it took several days to accomplish. The first issue is that your reprogram code can’t live in the same FLASH as you want to program. With only one bank of FLASH that meant running the code from RAM. That took a fair amount of learning including a jaunt into assembler and GLU linker file syntax. Next was writing the device driver to use the SAM7’s EFC peripheral. This was quite easy since a good shell exists in the ATMEL supplied library. The real problem came from trying to understand the sequence of events to write to FLASH. Get this, you need to write the data to the desired addresses inside a page AND THEN request a reprograming. Seems backwards to me and from previous experience. The other issue was a bug I found when I turned off interrupts as needed during the reprograming. When I turned them back on, any interrupts that occured during the outage where not queued. I therefore lost my timer tick interrupt and the OS stoped running. Turns out You need to use level triggering on interrupts and not edge. Strange.
-
Recent Posts
Recent Comments
Archives
- December 2021
- January 2019
- April 2018
- March 2018
- June 2016
- April 2016
- October 2015
- June 2015
- March 2015
- December 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
Categories
- ADE7763
- AmScope
- Arduino
- ARM
- AS3935
- AVC
- Components
- Desk Clock
- Die Filer
- FIRST LEGO League
- Furnace Monitor
- Home Energy Monitor
- IR Beacon
- LD-AIR
- Lightning detector
- MCP42010
- MSP430
- Personal
- PIC
- Pololu 9DOF IMU
- Processors
- Product reviews
- Projects
- Python
- Rigol DS1102D
- Robotic DVD burner
- RS232 Shifter
- Sailboat Race Timer
- Software
- Sugru
- SUNDAR
- Teensy
- uBlock LEA-6H
- Uncategorized
- Vectronix DMC
- XBee
Meta