![](/media/cache/profiles/827ccb0eea8a706c4c34a16891f84e7b.jpg.50x50_q85.jpg)
Bootload from SD card to sector 0, and jump to sector 24 where new firmware resides
Fork of Panel-Controller-Bootloader by
fattime.c@0:c3a652eff606, 2015-04-21 (annotated)
- Committer:
- bonchenko
- Date:
- Tue Apr 21 09:30:11 2015 +0000
- Revision:
- 0:c3a652eff606
Able to remove flash content, write new firmware from sd card, and jump to that new firmware. But its still not running completely
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bonchenko | 0:c3a652eff606 | 1 | /* Martin Thomas 4/2009 */ |
bonchenko | 0:c3a652eff606 | 2 | |
bonchenko | 0:c3a652eff606 | 3 | #include "integer.h" |
bonchenko | 0:c3a652eff606 | 4 | #include "fattime.h" |
bonchenko | 0:c3a652eff606 | 5 | #include "rtc.h" |
bonchenko | 0:c3a652eff606 | 6 | |
bonchenko | 0:c3a652eff606 | 7 | DWORD get_fattime (void) |
bonchenko | 0:c3a652eff606 | 8 | { |
bonchenko | 0:c3a652eff606 | 9 | DWORD res; |
bonchenko | 0:c3a652eff606 | 10 | RTC_t rtc; |
bonchenko | 0:c3a652eff606 | 11 | |
bonchenko | 0:c3a652eff606 | 12 | rtc_gettime( &rtc ); |
bonchenko | 0:c3a652eff606 | 13 | |
bonchenko | 0:c3a652eff606 | 14 | res = (((DWORD)rtc.year - 1980) << 25) |
bonchenko | 0:c3a652eff606 | 15 | | ((DWORD)rtc.month << 21) |
bonchenko | 0:c3a652eff606 | 16 | | ((DWORD)rtc.mday << 16) |
bonchenko | 0:c3a652eff606 | 17 | | (WORD)(rtc.hour << 11) |
bonchenko | 0:c3a652eff606 | 18 | | (WORD)(rtc.min << 5) |
bonchenko | 0:c3a652eff606 | 19 | | (WORD)(rtc.sec >> 1); |
bonchenko | 0:c3a652eff606 | 20 | |
bonchenko | 0:c3a652eff606 | 21 | return res; |
bonchenko | 0:c3a652eff606 | 22 | } |
bonchenko | 0:c3a652eff606 | 23 |