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.
board.cpp
00001 /* 00002 / _____) _ | | 00003 ( (____ _____ ____ _| |_ _____ ____| |__ 00004 \____ \| ___ | (_ _) ___ |/ ___) _ \ 00005 _____) ) ____| | | || |_| ____( (___| | | | 00006 (______/|_____)_|_|_| \__)_____)\____)_| |_| 00007 (C)2017 Semtech 00008 */ 00009 00010 #include "board.h" 00011 #include "mbed.h" 00012 00013 #ifndef USE_UART 00014 Serial pc(PB_6, PB_7); 00015 #endif 00016 00017 #ifdef V2 00018 SX1308 Sx1308(PA_4, PA_7, PA_6, PA_5, PB_4, PA_3); 00019 DigitalOut FEM_EN(PB_0); // enable ldo 2V for PA 00020 DigitalOut RADIO_RST (PA_0); // reset sx1257 but sx1257 deliver HSE clk for stm32 so use HSI clk before to reset sx1257 00021 DigitalOut HSCLKEN (PB_2); // clk to switch off the correlators 00022 #endif 00023 #ifdef V1 00024 SX1308 Sx1308(PA_4, PA_7, PA_6, PA_5, PB_1, PA_3); 00025 DigitalOut RADIO_RST (PA_0); 00026 DigitalOut HSCLKEN (PB_14); 00027 #endif 00028 00029 void FLASH_Prog( uint32_t Address, uint8_t Data ) { 00030 HAL_FLASH_Unlock(); 00031 __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR); 00032 FLASH_Erase_Sector(FLASH_SECTOR_4, VOLTAGE_RANGE_3); //sector4 0x8010000 0x801FFFF 00033 HAL_FLASH_Program(FLASH_TYPEPROGRAM_BYTE, Address, Data); 00034 HAL_FLASH_Lock(); 00035 }
Generated on Tue Jul 12 2022 22:19:20 by
1.7.2