mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 20:48:12 +00:00
STM32: test flash size
This commit is contained in:
parent
fc81b7ee5a
commit
9fcc030c15
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 1
|
#define VERSION_REVISION 1
|
||||||
#define VERSION_PATCH_LEVEL 60
|
#define VERSION_PATCH_LEVEL 61
|
||||||
|
|
||||||
//******************
|
//******************
|
||||||
// Protocols
|
// Protocols
|
||||||
|
@ -292,6 +292,39 @@ void setup()
|
|||||||
|
|
||||||
delay(50); // Brief delay for FTDI debugging
|
delay(50); // Brief delay for FTDI debugging
|
||||||
debugln("Multiprotocol version: %d.%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_PATCH_LEVEL);
|
debugln("Multiprotocol version: %d.%d.%d.%d", VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_PATCH_LEVEL);
|
||||||
|
#ifdef STM32_BOARD
|
||||||
|
//Read module flash size
|
||||||
|
unsigned short *flashSize = (unsigned short *) (0x1FFFF7E0);// Address register
|
||||||
|
debugln("Module Flash size: %dKB",(int)(*flashSize & 0xffff));
|
||||||
|
if((int)(*flashSize & 0xffff) < 128)
|
||||||
|
while (true) { //SOS
|
||||||
|
for(uint8_t i=0; i<3;i++)
|
||||||
|
{
|
||||||
|
LED_on;
|
||||||
|
delay(100);
|
||||||
|
LED_off;
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
for(uint8_t i=0; i<3;i++)
|
||||||
|
{
|
||||||
|
LED_on;
|
||||||
|
delay(500);
|
||||||
|
LED_off;
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
for(uint8_t i=0; i<3;i++)
|
||||||
|
{
|
||||||
|
LED_on;
|
||||||
|
delay(100);
|
||||||
|
LED_off;
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
LED_off;
|
||||||
|
delay(1000);
|
||||||
|
currMillis = millis();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// General pinout
|
// General pinout
|
||||||
@ -506,7 +539,7 @@ void setup()
|
|||||||
MProtocol_id_master=random_id(EEPROM_ID_OFFSET,false);
|
MProtocol_id_master=random_id(EEPROM_ID_OFFSET,false);
|
||||||
|
|
||||||
debugln("Module Id: %lx", MProtocol_id_master);
|
debugln("Module Id: %lx", MProtocol_id_master);
|
||||||
|
|
||||||
#ifdef ENABLE_PPM
|
#ifdef ENABLE_PPM
|
||||||
//Protocol and interrupts initialization
|
//Protocol and interrupts initialization
|
||||||
if(mode_select != MODE_SERIAL)
|
if(mode_select != MODE_SERIAL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user