40 #include "dev/flash.h"
41 #include "dev/watchdog.h"
43 #define FLASH_TIMEOUT 30
44 #define FLASH_REQ_TIMEOUT 150
46 #define INFOMEM_LO (unsigned short *)0x1800
47 #define INFOMEM_HI (unsigned short *)0x1a00
49 static uint16_t sfrie;
103 if(ptr >= INFOMEM_LO && ptr <= INFOMEM_HI) {
108 while(FCTL3 & 0x0001) {
117 if(ptr >= INFOMEM_LO && ptr <= INFOMEM_HI) {
128 if(ptr >= INFOMEM_LO && ptr <= INFOMEM_HI) {
133 while(FCTL3 & 0x0001) {
142 if(ptr >= INFOMEM_LO && ptr <= INFOMEM_HI) {
void flash_clear(unsigned short *ptr)
Clear a 16-bit word in flash ROM.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.
void watchdog_stop(void)
In watchdog mode, the WDT can not be stopped.
void flash_done(void)
Function that is to be called after flashing is done.
void flash_write(unsigned short *ptr, unsigned short word)
Write a 16-bit word to flash ROM.
void flash_setup(void)
Setup function to be called before any of the flash programming functions.