Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of BAE_CODE_MARCH_2017 by
Diff: BCN.cpp
- Revision:
- 93:e3fd5439e919
- Parent:
- 92:0d6e6ff9b7c9
- Child:
- 94:17172893d231
--- a/BCN.cpp Wed Jan 04 09:47:03 2017 +0000 +++ b/BCN.cpp Wed Jan 04 14:22:31 2017 +0000 @@ -626,19 +626,44 @@ // to write in flash function moved to TCTM void FCTN_BCN_SPND_TX() { + printf("BCN_SPND\n\r"); + BCN_SPND_TX = 1; + if( BCN_TX_SW_STATUS != 3 ) + { + writereg(RF22_REG_07_OPERATING_MODE1,0x00); //standby mode + //if( readreg(RF22_REG_07_OPERATING_MODE1) & 0x08 == 0x08 ) + { + BCN_SW = 0; //active high + BCN_TX_SW_STATUS = 0; //working but powered off + uint32_t FLASH_DATA; + FLASH_DATA = FCTN_BAE_RD_FLASH_ENTITY(0); //updated in flash + FLASH_DATA = (FLASH_DATA | 0x00006000); + FCTN_BAE_WR_FLASH(0,FLASH_DATA); + } + } +} +/* Previous version of the function +{ printf("BCN_SPND\n\r"); BCN_SPND_TX = 1; if( BCN_TX_MAIN_STATUS == 1 && BCN_TX_SW_STATUS == 1 ) { writereg(RF22_REG_07_OPERATING_MODE1,0x00); //standby mode - if( readreg(RF22_REG_07_OPERATING_MODE1) & 0x08 == 0x08 ) + //if( readreg(RF22_REG_07_OPERATING_MODE1) & 0x08 == 0x08 ) { BCN_SW = 0; //active high - BCN_TX_SW_STATUS = 3; + BCN_TX_SW_STATUS = 0; //working but powered off + uint32_t FLASH_DATA; + //remove comment below to enable writing to flash + + FLASH_DATA = FCTN_BAE_RD_FLASH_ENTITY(0); //updated in flash + FLASH_DATA = (FLASH_DATA | 0x00006000); + FCTN_BAE_WR_FLASH(0,FLASH_DATA); + } } } - +*/ /* int main() {