diff --git a/Firmware/.settings/language.settings.xml b/Firmware/.settings/language.settings.xml
index 6499965..d511d5b 100644
--- a/Firmware/.settings/language.settings.xml
+++ b/Firmware/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/Firmware/Core/Src/main.c b/Firmware/Core/Src/main.c
index bd2cf12..c7b36f5 100644
--- a/Firmware/Core/Src/main.c
+++ b/Firmware/Core/Src/main.c
@@ -60,216 +60,157 @@ static void MX_USART2_UART_Init(void);
static void MX_CRC_Init(void);
/* USER CODE BEGIN PFP */
+void SetStandbyXOSC();
+void SetPacketTypeLora();
+void SetPacketTypeFSK();
+uint32_t ComputeRfFreq(double frequencyMhz);
+void SetRfFreq(uint32_t rfFreq);
+void SetPaLowPower();
+void SetPa22dB();
+void SetTxPower(int8_t powerdBm);
+void SetContinuousWave();
+void SetTxInfinitePreamble();
+void SetTx(uint32_t timeout);
+void SetRx(uint32_t timeout);
+void SetModulationParamsLora(const uint8_t params[4]);
+void SetModulationParamsFSK(uint32_t bitrate, uint8_t pulseshape, uint8_t bandwidth, uint32_t freq_dev);
+void SetPacketParamsLora(uint16_t preamble_length, bool header_fixed, uint8_t payload_length, bool crc_enabled, bool invert_iq);
+void FSKBeep(int8_t powerdBm, uint32_t toneHz, uint32_t lengthMs);
+void CWBeep(int8_t powerdBm, uint32_t lengthMs);
+
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
-void SetStandbyXOSC() {
- uint8_t txbuf[2] = {0x80, 0x01};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetPacketTypeLora() {
- uint8_t txbuf[2] = {0x8A, 0x01};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetPacketTypeFSK() {
- uint8_t txbuf[2] = {0x8A, 0x00};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-uint32_t ComputeRfFreq(double frequencyMhz) {
- return (uint32_t)(frequencyMhz * 1048576L); //2^25/(32e6)
-}
-
-void SetRfFreq(uint32_t rfFreq) {
- uint8_t txbuf[5] = {0x86, (rfFreq & 0xFF000000) >> 24, (rfFreq & 0x00FF0000) >> 16, (rfFreq & 0x0000FF00) >> 8, rfFreq & 0x000000FF};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetPaLowPower() {
- // set Pa to 14 dB.
- uint8_t txbuf[5] = {0x95, 0x02, 0x02, 0x00, 0x01};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetPa22dB() {
- // set Pa to the highest 22 dBm
- uint8_t txbuf[5] = {0x95, 0x04, 0x07, 0x00, 0x01};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetTxPower(int8_t powerdBm) {
- // Between -9 and 22
- uint8_t txbuf[3] = {0x8E, (uint8_t) powerdBm, 0x02};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetContinuousWave() {
- uint8_t txbuf[1] = {0xD1};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf, 0);
-}
-
-void SetTxInfinitePreamble() {
- uint8_t txbuf[1] = {0xD2};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf, 0);
-}
-
-void SetTx(uint32_t timeout) {
- // Timeout * 15.625 µs
- uint8_t txbuf[4] = {0x83, (timeout & 0x00FF0000) >> 16, (timeout & 0x0000FF00) >> 8, timeout & 0x000000FF};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetRx(uint32_t timeout) {
- // Timeout * 15.625 µs
- // 0x000000 No timeout. Rx Single mode
- // 0xFFFFFF Rx Continuous mode. The device remains in RX mode until the host sends a command to change the operation mode
- uint8_t txbuf[4] = {0x82, (timeout & 0x00FF0000) >> 16, (timeout & 0x0000FF00) >> 8, timeout & 0x000000FF};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetModulationParamsLora(const uint8_t params[4]) {
- uint8_t txbuf[5] = {0x8B, params[0], params[1], params[2], params[3]};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetModulationParamsFSK(uint32_t bitrate, uint8_t pulseshape, uint8_t bandwidth, uint32_t freq_dev) {
- uint32_t BR = 32 * 32e6 / bitrate;
- uint32_t fdev = (uint32_t) (freq_dev * 1.048576L); // 2^25/32e6 = 1.048576
- uint8_t txbuf[9] = {0x8B, (BR & 0x00FF0000) >> 16, (BR & 0x0000FF00) >> 8, BR & 0x000000FF, pulseshape, bandwidth, (fdev & 0x00FF0000) >> 16, (fdev & 0x0000FF00) >> 8, fdev & 0x000000FF};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetPacketParamsLora(uint16_t preamble_length, bool header_fixed, uint8_t payload_length, bool crc_enabled, bool invert_iq) {
- uint8_t txbuf[7] = {0x8C, (uint8_t)((preamble_length >> 8) & 0xFF), (uint8_t)(preamble_length & 0xFF),
- (uint8_t) header_fixed, payload_length, (uint8_t) crc_enabled, (uint8_t) invert_iq};
-
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
+// standard frequencies. Note: zero indexed.
+const double LPD433[69] = {
+ 433.075, 433.100, 433.125, 433.150, 433.175, 433.200, 433.225, 433.250, 433.275, 433.300, // 1-10
+ 433.325, 433.350, 433.375, 433.400, 433.425, 433.450, 433.475, 433.500, 433.525, 433.550, // 11-20
+ 433.575, 433.600, 433.625, 433.650, 433.675, 433.700, 433.725, 433.750, 433.775, 433.800, // 21-30
+ 433.825, 433.850, 433.875, 433.900, 433.925, 433.950, 433.975, 434.000, 434.025, 434.050, // 31-40
+ 434.075, 434.100, 434.125, 434.150, 434.175, 434.200, 434.225, 434.250, 434.275, 434.300, // 41-50
+ 434.325, 434.350, 434.375, 434.400, 434.425, 434.450, 434.475, 434.500, 434.525, 434.550, // 51-60
+ 434.575, 434.600, 434.625, 434.650, 434.675, 434.700, 434.725, 434.750, 434.775 // 61-69
+};
-void FSKBeep(int8_t powerdBm, uint32_t toneHz, uint32_t lengthMs) {
- // assume in standbyXOSC already.
- HAL_Delay(1);
- SetTxPower(powerdBm);
- SetModulationParamsFSK(toneHz*2, 0x09, 0x1E, 2500);
- HAL_Delay(5);
- SetTxInfinitePreamble();
- HAL_Delay(lengthMs);
- SetStandbyXOSC();
- HAL_Delay(5);
-}
+const double PMR446[16] = {
+ 446.00625, 446.01875, 446.03125, 446.04375, 446.05625, // 1-5
+ 446.06875, 446.08125, 446.09375, 446.10625, 446.11875, // 6-10
+ 446.13125, 446.14375, 446.15625, 446.16875, 446.18125, // 11-15
+ 446.19375 // 16
+};
-void CWBeep(int8_t powerdBm, uint32_t lengthMs) {
- HAL_Delay(1);
- SetTxPower(powerdBm);
- HAL_Delay(5);
- SetContinuousWave();
- HAL_Delay(lengthMs);
- SetStandbyXOSC();
- HAL_Delay(5);
-}
+const double FRS[22] = {
+ 462.5625, 462.5875, 462.6125, 462.6375, 462.6625, 462.6875, 462.7125, 467.5625, 467.5875, 467.6125, // 1-10
+ 467.6375, 467.6625, 467.6875, 467.7125, 462.5500, 462.5750, 462.6000, 462.6250, 462.6500, 462.6750, // 11-20
+ 462.7000, 462.7250 // 21-22
+};
// letter to morse based on ASCII characters.
// right-terminated by a "1". 1 is dah, 0 is dit.
const uint8_t morse_chars[] = {
- 0b11111111, // Special code for SPACE
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b11100000, // Minus sign (indicated by "M")
- 0b10000000, // N/A
- 0b10010100, // "/" Slash
- 0b11111100, // "0"
- 0b01111100, // "1"
- 0b00111100, // "2"
- 0b00011100, // "3"
- 0b00001100, // "4"
- 0b00000100, // "5"
- 0b10000100, // "6"
- 0b11000100, // "7"
- 0b11100100, // "8"
- 0b11110100, // "9"
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10001100, // "=" BT prosign/Equal sign
- 0b10000000, // N/A
- 0b00110010, // "?" Question mark
- 0b10000000, // N/A
- 0b01100000, // "A"
- 0b10001000, // "B"
- 0b10101000, // "C"
- 0b10010000, // "D"
- 0b01000000, // "E"
- 0b00101000, // "F"
- 0b11010000, // "G"
- 0b00001000, // "H"
- 0b00100000, // "I"
- 0b01111000, // "J"
- 0b10110000, // "K"
- 0b01001000, // "L"
- 0b11100000, // "M"
- 0b10100000, // "N"
- 0b11110000, // "O"
- 0b01101000, // "P"
- 0b11011000, // "Q"
- 0b01010000, // "R"
- 0b00010000, // "S"
- 0b11000000, // "T"
- 0b00110000, // "U"
- 0b00011000, // "V"
- 0b01110000, // "W"
- 0b10011000, // "X"
- 0b10111000, // "Y"
- 0b11001000, // "Z"
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b10000000, // N/A
- 0b01100000, // "a"
- 0b10001000, // "b"
- 0b10101000, // "c"
- 0b10010000, // "d"
- 0b01000000, // "e"
- 0b00101000, // "f"
- 0b11010000, // "g"
- 0b00001000, // "h"
- 0b00100000, // "i"
- 0b01111000, // "j"
- 0b10110000, // "k"
- 0b01001000, // "l"
- 0b11100000, // "m"
- 0b10100000, // "n"
- 0b11110000, // "o"
- 0b01101000, // "p"
- 0b11011000, // "q"
- 0b01010000, // "r"
- 0b00010000, // "s"
- 0b11000000, // "t"
- 0b00110000, // "u"
- 0b00011000, // "v"
- 0b01110000, // "w"
- 0b10011000, // "x"
- 0b10111000, // "y"
- 0b11001000 // "z"
+ 0b11111111, // Special code for SPACE
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000110, // - Hyphen sign
+ 0b10000000, // N/A
+ 0b10010100, // "/" Slash
+ 0b11111100, // "0"
+ 0b01111100, // "1"
+ 0b00111100, // "2"
+ 0b00011100, // "3"
+ 0b00001100, // "4"
+ 0b00000100, // "5"
+ 0b10000100, // "6"
+ 0b11000100, // "7"
+ 0b11100100, // "8"
+ 0b11110100, // "9"
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10001100, // "=" BT prosign/Equal sign
+ 0b10000000, // N/A
+ 0b00110010, // "?" Question mark
+ 0b10000000, // N/A
+ 0b01100000, // "A"
+ 0b10001000, // "B"
+ 0b10101000, // "C"
+ 0b10010000, // "D"
+ 0b01000000, // "E"
+ 0b00101000, // "F"
+ 0b11010000, // "G"
+ 0b00001000, // "H"
+ 0b00100000, // "I"
+ 0b01111000, // "J"
+ 0b10110000, // "K"
+ 0b01001000, // "L"
+ 0b11100000, // "M"
+ 0b10100000, // "N"
+ 0b11110000, // "O"
+ 0b01101000, // "P"
+ 0b11011000, // "Q"
+ 0b01010000, // "R"
+ 0b00010000, // "S"
+ 0b11000000, // "T"
+ 0b00110000, // "U"
+ 0b00011000, // "V"
+ 0b01110000, // "W"
+ 0b10011000, // "X"
+ 0b10111000, // "Y"
+ 0b11001000, // "Z"
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b10000000, // N/A
+ 0b01100000, // "a"
+ 0b10001000, // "b"
+ 0b10101000, // "c"
+ 0b10010000, // "d"
+ 0b01000000, // "e"
+ 0b00101000, // "f"
+ 0b11010000, // "g"
+ 0b00001000, // "h"
+ 0b00100000, // "i"
+ 0b01111000, // "j"
+ 0b10110000, // "k"
+ 0b01001000, // "l"
+ 0b11100000, // "m"
+ 0b10100000, // "n"
+ 0b11110000, // "o"
+ 0b01101000, // "p"
+ 0b11011000, // "q"
+ 0b01010000, // "r"
+ 0b00010000, // "s"
+ 0b11000000, // "t"
+ 0b00110000, // "u"
+ 0b00011000, // "v"
+ 0b01110000, // "w"
+ 0b10011000, // "x"
+ 0b10111000, // "y"
+ 0b11001000 // "z"
};
+void LED_on() {
+ HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
+}
+void LED_off() {
+ HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);
+}
+
// https://en.wikipedia.org/wiki/Morse_code#/media/File:International_Morse_Code.svg
uint32_t morse_unit_ms = 100;
int8_t morse_power = 10;
@@ -341,7 +282,6 @@ void play_morse_word(uint8_t* letters, uint8_t len, bool use_cw) {
}
}
-
/* USER CODE END 0 */
/**
@@ -379,34 +319,47 @@ int main(void)
/* USER CODE BEGIN 2 */
//EE_Status ee_status = EE_OK;
-
- HAL_Delay(1000); // initial start
+ HAL_Delay(6000); // initial start
SetStandbyXOSC();
HAL_Delay(1);
SetPacketTypeLora();
HAL_Delay(1);
- //SetPaLowPower();
- SetPa22dB();
+
+ //SetPaLowPower(); // For powers up to 14 dBm
+ SetPa22dB(); // Uncomment for powers up to 22 dBm
HAL_Delay(1);
SetTxPower(-9);
HAL_Delay(1);
SetPacketTypeFSK();
- SetModulationParamsFSK(2000, 0x09, 0x1E, 3000);
+ SetModulationParamsFSK(2000, 0x09, 0x1E, 2500);
- double center_freq = 446.14375;
+ // Frequency setting in MHz
+ double center_freq = PMR446[13-1] ;//434.700;
+ //double center_freq = 223.010;
+ double freq_correction = 0.99999539941; // Try trimming caps
- SetRfFreq(ComputeRfFreq(center_freq));
+ SetRfFreq(ComputeRfFreq(center_freq * freq_correction));
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
+
+ /*
+ while (1) {
+ // Emulate comspec beacon at 40 mW
+ LED_on();
+ CWBeep(16, 50);
+ LED_off();
+ HAL_Delay(1000);
+ }*/
+
while (1)
{
- HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
+ LED_on();
FSKBeep(-9, 500, 200);
HAL_Delay(50);
@@ -415,16 +368,17 @@ int main(void)
HAL_Delay(50);
- FSKBeep(10, 1000, 200);
+ FSKBeep(14, 1000, 200);
HAL_Delay(50);
- HAL_Delay(1000);
- uint8_t callsign[] = "CALLSIGN";
- play_morse_word(callsign, sizeof(callsign)-1, false);
+ //HAL_Delay(1000);
+ //uint8_t callsign[] = "HI";
+ //play_morse_word(callsign, sizeof(callsign)-1, false);
- HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);
- HAL_Delay(3000);
+ LED_off();
+
+ HAL_Delay(4000);
/* USER CODE END WHILE */
@@ -669,7 +623,113 @@ static void MX_GPIO_Init(void)
}
/* USER CODE BEGIN 4 */
+void SetStandbyXOSC() {
+ uint8_t txbuf[2] = {0x80, 0x01};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+void SetPacketTypeLora() {
+ uint8_t txbuf[2] = {0x8A, 0x01};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetPacketTypeFSK() {
+ uint8_t txbuf[2] = {0x8A, 0x00};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+uint32_t ComputeRfFreq(double frequencyMhz) {
+ return (uint32_t)(frequencyMhz * 1048576L); //2^25/(32e6)
+}
+
+void SetRfFreq(uint32_t rfFreq) {
+ uint8_t txbuf[5] = {0x86, (rfFreq & 0xFF000000) >> 24, (rfFreq & 0x00FF0000) >> 16, (rfFreq & 0x0000FF00) >> 8, rfFreq & 0x000000FF};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetPaLowPower() {
+ // set Pa to 14 dB.
+ uint8_t txbuf[5] = {0x95, 0x02, 0x02, 0x00, 0x01};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetPa22dB() {
+ // set Pa to the highest 22 dBm
+ uint8_t txbuf[5] = {0x95, 0x04, 0x07, 0x00, 0x01};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetTxPower(int8_t powerdBm) {
+ // Between -9 and 22
+ uint8_t txbuf[3] = {0x8E, (uint8_t) powerdBm, 0x02};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetContinuousWave() {
+ uint8_t txbuf[1] = {0xD1};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf, 0);
+}
+
+void SetTxInfinitePreamble() {
+ uint8_t txbuf[1] = {0xD2};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf, 0);
+}
+
+void SetTx(uint32_t timeout) {
+ // Timeout * 15.625 µs
+ uint8_t txbuf[4] = {0x83, (timeout & 0x00FF0000) >> 16, (timeout & 0x0000FF00) >> 8, timeout & 0x000000FF};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetRx(uint32_t timeout) {
+ // Timeout * 15.625 µs
+ // 0x000000 No timeout. Rx Single mode
+ // 0xFFFFFF Rx Continuous mode. The device remains in RX mode until the host sends a command to change the operation mode
+ uint8_t txbuf[4] = {0x82, (timeout & 0x00FF0000) >> 16, (timeout & 0x0000FF00) >> 8, timeout & 0x000000FF};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetModulationParamsLora(const uint8_t params[4]) {
+ uint8_t txbuf[5] = {0x8B, params[0], params[1], params[2], params[3]};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetModulationParamsFSK(uint32_t bitrate, uint8_t pulseshape, uint8_t bandwidth, uint32_t freq_dev) {
+ uint32_t BR = 32 * 32e6 / bitrate;
+ uint32_t fdev = (uint32_t) (freq_dev * 1.048576L); // 2^25/32e6 = 1.048576
+ uint8_t txbuf[9] = {0x8B, (BR & 0x00FF0000) >> 16, (BR & 0x0000FF00) >> 8, BR & 0x000000FF, pulseshape, bandwidth, (fdev & 0x00FF0000) >> 16, (fdev & 0x0000FF00) >> 8, fdev & 0x000000FF};
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+void SetPacketParamsLora(uint16_t preamble_length, bool header_fixed, uint8_t payload_length, bool crc_enabled, bool invert_iq) {
+ uint8_t txbuf[7] = {0x8C, (uint8_t)((preamble_length >> 8) & 0xFF), (uint8_t)(preamble_length & 0xFF),
+ (uint8_t) header_fixed, payload_length, (uint8_t) crc_enabled, (uint8_t) invert_iq};
+
+ HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
+}
+
+
+void FSKBeep(int8_t powerdBm, uint32_t toneHz, uint32_t lengthMs) {
+ // assume in standbyXOSC already.
+ HAL_Delay(1);
+ SetTxPower(powerdBm);
+ SetModulationParamsFSK(toneHz*2, 0x09, 0x1E, 2500);
+ HAL_Delay(5);
+ SetTxInfinitePreamble();
+ HAL_Delay(lengthMs);
+ SetStandbyXOSC();
+ HAL_Delay(5);
+}
+
+void CWBeep(int8_t powerdBm, uint32_t lengthMs) {
+ HAL_Delay(1);
+ SetTxPower(powerdBm);
+ HAL_Delay(5);
+ SetContinuousWave();
+ HAL_Delay(lengthMs);
+ SetStandbyXOSC();
+ HAL_Delay(5);
+}
/* USER CODE END 4 */
/**
diff --git a/Firmware/Debug/Core/Src/main.o b/Firmware/Debug/Core/Src/main.o
index dd08cc3..231a74c 100644
Binary files a/Firmware/Debug/Core/Src/main.o and b/Firmware/Debug/Core/Src/main.o differ
diff --git a/Firmware/Debug/Core/Src/main.su b/Firmware/Debug/Core/Src/main.su
index 515c775..eb3f7f7 100644
--- a/Firmware/Debug/Core/Src/main.su
+++ b/Firmware/Debug/Core/Src/main.su
@@ -1,29 +1,31 @@
../Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_ll_rcc.h:999:22:LL_RCC_HSE_EnableDiv2 4 static
../Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_ll_bus.h:449:22:LL_AHB2_GRP1_EnableClock 24 static
-../Core/Src/main.c:68:6:SetStandbyXOSC 16 static
-../Core/Src/main.c:73:6:SetPacketTypeLora 16 static
-../Core/Src/main.c:78:6:SetPacketTypeFSK 16 static
-../Core/Src/main.c:83:10:ComputeRfFreq 16 static
-../Core/Src/main.c:87:6:SetRfFreq 24 static
-../Core/Src/main.c:92:6:SetPaLowPower 16 static
-../Core/Src/main.c:98:6:SetPa22dB 16 static
-../Core/Src/main.c:104:6:SetTxPower 24 static
-../Core/Src/main.c:110:6:SetContinuousWave 16 static
-../Core/Src/main.c:115:6:SetTxInfinitePreamble 16 static
-../Core/Src/main.c:120:6:SetTx 24 static
-../Core/Src/main.c:126:6:SetRx 24 static
-../Core/Src/main.c:134:6:SetModulationParamsLora 24 static
-../Core/Src/main.c:139:6:SetModulationParamsFSK 48 static
-../Core/Src/main.c:146:6:SetPacketParamsLora 32 static
-../Core/Src/main.c:154:6:FSKBeep 24 static
-../Core/Src/main.c:166:6:CWBeep 16 static
-../Core/Src/main.c:277:6:play_morse_char 24 static
-../Core/Src/main.c:330:6:play_morse_word 24 static
-../Core/Src/main.c:351:5:main 32 static
-../Core/Src/main.c:440:6:SystemClock_Config 112 static
-../Core/Src/main.c:486:13:MX_ADC_Init 8 static
-../Core/Src/main.c:533:13:MX_CRC_Init 8 static
-../Core/Src/main.c:564:13:MX_SUBGHZ_Init 8 static
-../Core/Src/main.c:590:13:MX_USART2_UART_Init 8 static
-../Core/Src/main.c:638:13:MX_GPIO_Init 32 static
-../Core/Src/main.c:679:6:Error_Handler 4 static,ignoring_inline_asm
+../Core/Src/main.c:207:6:LED_on 8 static
+../Core/Src/main.c:210:6:LED_off 8 static
+../Core/Src/main.c:218:6:play_morse_char 24 static
+../Core/Src/main.c:271:6:play_morse_word 24 static
+../Core/Src/main.c:291:5:main 24 static
+../Core/Src/main.c:394:6:SystemClock_Config 112 static
+../Core/Src/main.c:440:13:MX_ADC_Init 8 static
+../Core/Src/main.c:487:13:MX_CRC_Init 8 static
+../Core/Src/main.c:518:13:MX_SUBGHZ_Init 8 static
+../Core/Src/main.c:544:13:MX_USART2_UART_Init 8 static
+../Core/Src/main.c:592:13:MX_GPIO_Init 32 static
+../Core/Src/main.c:626:6:SetStandbyXOSC 16 static
+../Core/Src/main.c:631:6:SetPacketTypeLora 16 static
+../Core/Src/main.c:636:6:SetPacketTypeFSK 16 static
+../Core/Src/main.c:641:10:ComputeRfFreq 16 static
+../Core/Src/main.c:645:6:SetRfFreq 24 static
+../Core/Src/main.c:650:6:SetPaLowPower 16 static
+../Core/Src/main.c:656:6:SetPa22dB 16 static
+../Core/Src/main.c:662:6:SetTxPower 24 static
+../Core/Src/main.c:668:6:SetContinuousWave 16 static
+../Core/Src/main.c:673:6:SetTxInfinitePreamble 16 static
+../Core/Src/main.c:678:6:SetTx 24 static
+../Core/Src/main.c:684:6:SetRx 24 static
+../Core/Src/main.c:692:6:SetModulationParamsLora 24 static
+../Core/Src/main.c:697:6:SetModulationParamsFSK 48 static
+../Core/Src/main.c:704:6:SetPacketParamsLora 32 static
+../Core/Src/main.c:712:6:FSKBeep 24 static
+../Core/Src/main.c:724:6:CWBeep 16 static
+../Core/Src/main.c:739:6:Error_Handler 4 static,ignoring_inline_asm
diff --git a/Firmware/Debug/rocketbeacon.elf b/Firmware/Debug/rocketbeacon.elf
index afba389..ee35637 100644
Binary files a/Firmware/Debug/rocketbeacon.elf and b/Firmware/Debug/rocketbeacon.elf differ
diff --git a/Firmware/Debug/rocketbeacon.list b/Firmware/Debug/rocketbeacon.list
index a07f4ef..e214d51 100644
--- a/Firmware/Debug/rocketbeacon.list
+++ b/Firmware/Debug/rocketbeacon.list
@@ -5,45 +5,45 @@ Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 00000138 08000000 08000000 00010000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 00004848 08000138 08000138 00010138 2**3
+ 1 .text 00004654 08000138 08000138 00010138 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 0000015c 08004980 08004980 00014980 2**2
+ 2 .rodata 000000f4 0800478c 0800478c 0001478c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 08004adc 08004adc 00020014 2**0
+ 3 .ARM.extab 00000000 08004880 08004880 0002000c 2**0
CONTENTS
- 4 .ARM 00000008 08004adc 08004adc 00014adc 2**2
+ 4 .ARM 00000008 08004880 08004880 00014880 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 5 .preinit_array 00000000 08004ae4 08004ae4 00020014 2**0
+ 5 .preinit_array 00000000 08004888 08004888 0002000c 2**0
CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 08004ae4 08004ae4 00014ae4 2**2
+ 6 .init_array 00000004 08004888 08004888 00014888 2**2
CONTENTS, ALLOC, LOAD, DATA
- 7 .fini_array 00000004 08004ae8 08004ae8 00014ae8 2**2
+ 7 .fini_array 00000004 0800488c 0800488c 0001488c 2**2
CONTENTS, ALLOC, LOAD, DATA
- 8 .data 00000014 20000000 08004aec 00020000 2**2
+ 8 .data 0000000c 20000000 08004890 00020000 2**2
CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 00000148 20000014 08004b00 00020014 2**2
+ 9 .bss 00000148 2000000c 0800489c 0002000c 2**2
ALLOC
- 10 ._user_heap_stack 00000604 2000015c 08004b00 0002015c 2**0
+ 10 ._user_heap_stack 00000604 20000154 0800489c 00020154 2**0
ALLOC
- 11 .ARM.attributes 0000002a 00000000 00000000 00020014 2**0
+ 11 .ARM.attributes 0000002a 00000000 00000000 0002000c 2**0
CONTENTS, READONLY
- 12 .debug_info 00012268 00000000 00000000 0002003e 2**0
+ 12 .debug_info 00012328 00000000 00000000 00020036 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 13 .debug_abbrev 00002862 00000000 00000000 000322a6 2**0
+ 13 .debug_abbrev 0000285c 00000000 00000000 0003235e 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_aranges 00001358 00000000 00000000 00034b08 2**3
+ 14 .debug_aranges 00001368 00000000 00000000 00034bc0 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_ranges 00001270 00000000 00000000 00035e60 2**3
+ 15 .debug_ranges 00001280 00000000 00000000 00035f28 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_macro 0001ab62 00000000 00000000 000370d0 2**0
+ 16 .debug_macro 0001ab62 00000000 00000000 000371a8 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_line 00011d8a 00000000 00000000 00051c32 2**0
+ 17 .debug_line 00011daa 00000000 00000000 00051d0a 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_str 000a7721 00000000 00000000 000639bc 2**0
+ 18 .debug_str 000a7745 00000000 00000000 00063ab4 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .comment 00000050 00000000 00000000 0010b0dd 2**0
+ 19 .comment 00000050 00000000 00000000 0010b1f9 2**0
CONTENTS, READONLY
- 20 .debug_frame 00005250 00000000 00000000 0010b130 2**2
+ 20 .debug_frame 00005288 00000000 00000000 0010b24c 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
@@ -60,9 +60,9 @@ Disassembly of section .text:
800014a: 2301 movs r3, #1
800014c: 7023 strb r3, [r4, #0]
800014e: bd10 pop {r4, pc}
- 8000150: 20000014 .word 0x20000014
+ 8000150: 2000000c .word 0x2000000c
8000154: 00000000 .word 0x00000000
- 8000158: 08004968 .word 0x08004968
+ 8000158: 08004774 .word 0x08004774
0800015c :
800015c: b508 push {r3, lr}
@@ -73,8 +73,8 @@ Disassembly of section .text:
8000166: f3af 8000 nop.w
800016a: bd08 pop {r3, pc}
800016c: 00000000 .word 0x00000000
- 8000170: 20000018 .word 0x20000018
- 8000174: 08004968 .word 0x08004968
+ 8000170: 20000010 .word 0x20000010
+ 8000174: 08004774 .word 0x08004774
08000178 <__aeabi_drsub>:
8000178: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000
@@ -1054,10923 +1054,10626 @@ __STATIC_INLINE void LL_AHB2_GRP1_EnableClock(uint32_t Periphs)
8000ca0: bc80 pop {r7}
8000ca2: 4770 bx lr
-08000ca4 :
-/* USER CODE END PFP */
+08000ca4 :
+ 0b10011000, // "x"
+ 0b10111000, // "y"
+ 0b11001000 // "z"
+};
-/* Private user code ---------------------------------------------------------*/
-/* USER CODE BEGIN 0 */
-
-void SetStandbyXOSC() {
+void LED_on() {
8000ca4: b580 push {r7, lr}
- 8000ca6: b082 sub sp, #8
- 8000ca8: af00 add r7, sp, #0
- uint8_t txbuf[2] = {0x80, 0x01};
- 8000caa: f44f 73c0 mov.w r3, #384 ; 0x180
- 8000cae: 80bb strh r3, [r7, #4]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000cb0: 7939 ldrb r1, [r7, #4]
- 8000cb2: 1d3a adds r2, r7, #4
- 8000cb4: 3201 adds r2, #1
- 8000cb6: 2301 movs r3, #1
- 8000cb8: 4803 ldr r0, [pc, #12] ; (8000cc8 )
- 8000cba: f002 ff63 bl 8003b84
-}
- 8000cbe: bf00 nop
- 8000cc0: 3708 adds r7, #8
- 8000cc2: 46bd mov sp, r7
- 8000cc4: bd80 pop {r7, pc}
- 8000cc6: bf00 nop
- 8000cc8: 200000b8 .word 0x200000b8
-
-08000ccc :
-
-void SetPacketTypeLora() {
- 8000ccc: b580 push {r7, lr}
- 8000cce: b082 sub sp, #8
- 8000cd0: af00 add r7, sp, #0
- uint8_t txbuf[2] = {0x8A, 0x01};
- 8000cd2: f44f 73c5 mov.w r3, #394 ; 0x18a
- 8000cd6: 80bb strh r3, [r7, #4]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000cd8: 7939 ldrb r1, [r7, #4]
- 8000cda: 1d3a adds r2, r7, #4
- 8000cdc: 3201 adds r2, #1
- 8000cde: 2301 movs r3, #1
- 8000ce0: 4803 ldr r0, [pc, #12] ; (8000cf0 )
- 8000ce2: f002 ff4f bl 8003b84
-}
- 8000ce6: bf00 nop
- 8000ce8: 3708 adds r7, #8
- 8000cea: 46bd mov sp, r7
- 8000cec: bd80 pop {r7, pc}
- 8000cee: bf00 nop
- 8000cf0: 200000b8 .word 0x200000b8
-
-08000cf4 :
-
-void SetPacketTypeFSK() {
- 8000cf4: b580 push {r7, lr}
- 8000cf6: b082 sub sp, #8
- 8000cf8: af00 add r7, sp, #0
- uint8_t txbuf[2] = {0x8A, 0x00};
- 8000cfa: 238a movs r3, #138 ; 0x8a
- 8000cfc: 80bb strh r3, [r7, #4]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000cfe: 7939 ldrb r1, [r7, #4]
- 8000d00: 1d3a adds r2, r7, #4
- 8000d02: 3201 adds r2, #1
- 8000d04: 2301 movs r3, #1
- 8000d06: 4803 ldr r0, [pc, #12] ; (8000d14 )
- 8000d08: f002 ff3c bl 8003b84
-}
- 8000d0c: bf00 nop
- 8000d0e: 3708 adds r7, #8
- 8000d10: 46bd mov sp, r7
- 8000d12: bd80 pop {r7, pc}
- 8000d14: 200000b8 .word 0x200000b8
-
-08000d18 :
-
-uint32_t ComputeRfFreq(double frequencyMhz) {
- 8000d18: b580 push {r7, lr}
- 8000d1a: b082 sub sp, #8
- 8000d1c: af00 add r7, sp, #0
- 8000d1e: e9c7 0100 strd r0, r1, [r7]
- return (uint32_t)(frequencyMhz * 1048576L); //2^25/(32e6)
- 8000d22: f04f 0200 mov.w r2, #0
- 8000d26: 4b08 ldr r3, [pc, #32] ; (8000d48 )
- 8000d28: e9d7 0100 ldrd r0, r1, [r7]
- 8000d2c: f7ff fbe0 bl 80004f0 <__aeabi_dmul>
- 8000d30: 4602 mov r2, r0
- 8000d32: 460b mov r3, r1
- 8000d34: 4610 mov r0, r2
- 8000d36: 4619 mov r1, r3
- 8000d38: f7ff fdec bl 8000914 <__aeabi_d2uiz>
- 8000d3c: 4603 mov r3, r0
-}
- 8000d3e: 4618 mov r0, r3
- 8000d40: 3708 adds r7, #8
- 8000d42: 46bd mov sp, r7
- 8000d44: bd80 pop {r7, pc}
- 8000d46: bf00 nop
- 8000d48: 41300000 .word 0x41300000
-
-08000d4c :
-
-void SetRfFreq(uint32_t rfFreq) {
- 8000d4c: b580 push {r7, lr}
- 8000d4e: b084 sub sp, #16
- 8000d50: af00 add r7, sp, #0
- 8000d52: 6078 str r0, [r7, #4]
- uint8_t txbuf[5] = {0x86, (rfFreq & 0xFF000000) >> 24, (rfFreq & 0x00FF0000) >> 16, (rfFreq & 0x0000FF00) >> 8, rfFreq & 0x000000FF};
- 8000d54: 2386 movs r3, #134 ; 0x86
- 8000d56: 723b strb r3, [r7, #8]
- 8000d58: 687b ldr r3, [r7, #4]
- 8000d5a: 0e1b lsrs r3, r3, #24
- 8000d5c: b2db uxtb r3, r3
- 8000d5e: 727b strb r3, [r7, #9]
- 8000d60: 687b ldr r3, [r7, #4]
- 8000d62: 0c1b lsrs r3, r3, #16
- 8000d64: b2db uxtb r3, r3
- 8000d66: 72bb strb r3, [r7, #10]
- 8000d68: 687b ldr r3, [r7, #4]
- 8000d6a: 0a1b lsrs r3, r3, #8
- 8000d6c: b2db uxtb r3, r3
- 8000d6e: 72fb strb r3, [r7, #11]
- 8000d70: 687b ldr r3, [r7, #4]
- 8000d72: b2db uxtb r3, r3
- 8000d74: 733b strb r3, [r7, #12]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000d76: 7a39 ldrb r1, [r7, #8]
- 8000d78: f107 0208 add.w r2, r7, #8
- 8000d7c: 3201 adds r2, #1
- 8000d7e: 2304 movs r3, #4
- 8000d80: 4803 ldr r0, [pc, #12] ; (8000d90 )
- 8000d82: f002 feff bl 8003b84
-}
- 8000d86: bf00 nop
- 8000d88: 3710 adds r7, #16
- 8000d8a: 46bd mov sp, r7
- 8000d8c: bd80 pop {r7, pc}
- 8000d8e: bf00 nop
- 8000d90: 200000b8 .word 0x200000b8
-
-08000d94 :
- // set Pa to 14 dB.
- uint8_t txbuf[5] = {0x95, 0x02, 0x02, 0x00, 0x01};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetPa22dB() {
- 8000d94: b580 push {r7, lr}
- 8000d96: b082 sub sp, #8
- 8000d98: af00 add r7, sp, #0
- // set Pa to the highest 22 dBm
- uint8_t txbuf[5] = {0x95, 0x04, 0x07, 0x00, 0x01};
- 8000d9a: 4a09 ldr r2, [pc, #36] ; (8000dc0 )
- 8000d9c: 463b mov r3, r7
- 8000d9e: e892 0003 ldmia.w r2, {r0, r1}
- 8000da2: 6018 str r0, [r3, #0]
- 8000da4: 3304 adds r3, #4
- 8000da6: 7019 strb r1, [r3, #0]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000da8: 7839 ldrb r1, [r7, #0]
- 8000daa: 463a mov r2, r7
- 8000dac: 3201 adds r2, #1
- 8000dae: 2304 movs r3, #4
- 8000db0: 4804 ldr r0, [pc, #16] ; (8000dc4 )
- 8000db2: f002 fee7 bl 8003b84
-}
- 8000db6: bf00 nop
- 8000db8: 3708 adds r7, #8
- 8000dba: 46bd mov sp, r7
- 8000dbc: bd80 pop {r7, pc}
- 8000dbe: bf00 nop
- 8000dc0: 08004988 .word 0x08004988
- 8000dc4: 200000b8 .word 0x200000b8
-
-08000dc8 :
-
-void SetTxPower(int8_t powerdBm) {
- 8000dc8: b580 push {r7, lr}
- 8000dca: b084 sub sp, #16
- 8000dcc: af00 add r7, sp, #0
- 8000dce: 4603 mov r3, r0
- 8000dd0: 71fb strb r3, [r7, #7]
- // Between -9 and 22
- uint8_t txbuf[3] = {0x8E, (uint8_t) powerdBm, 0x02};
- 8000dd2: 238e movs r3, #142 ; 0x8e
- 8000dd4: 733b strb r3, [r7, #12]
- 8000dd6: 79fb ldrb r3, [r7, #7]
- 8000dd8: 737b strb r3, [r7, #13]
- 8000dda: 2302 movs r3, #2
- 8000ddc: 73bb strb r3, [r7, #14]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000dde: 7b39 ldrb r1, [r7, #12]
- 8000de0: f107 020c add.w r2, r7, #12
- 8000de4: 3201 adds r2, #1
- 8000de6: 2302 movs r3, #2
- 8000de8: 4803 ldr r0, [pc, #12] ; (8000df8 )
- 8000dea: f002 fecb bl 8003b84
-}
- 8000dee: bf00 nop
- 8000df0: 3710 adds r7, #16
- 8000df2: 46bd mov sp, r7
- 8000df4: bd80 pop {r7, pc}
- 8000df6: bf00 nop
- 8000df8: 200000b8 .word 0x200000b8
-
-08000dfc :
-
-void SetContinuousWave() {
- 8000dfc: b580 push {r7, lr}
- 8000dfe: b082 sub sp, #8
- 8000e00: af00 add r7, sp, #0
- uint8_t txbuf[1] = {0xD1};
- 8000e02: 23d1 movs r3, #209 ; 0xd1
- 8000e04: 713b strb r3, [r7, #4]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf, 0);
- 8000e06: 7939 ldrb r1, [r7, #4]
- 8000e08: 1d3a adds r2, r7, #4
- 8000e0a: 2300 movs r3, #0
- 8000e0c: 4803 ldr r0, [pc, #12] ; (8000e1c )
- 8000e0e: f002 feb9 bl 8003b84
-}
- 8000e12: bf00 nop
- 8000e14: 3708 adds r7, #8
- 8000e16: 46bd mov sp, r7
- 8000e18: bd80 pop {r7, pc}
- 8000e1a: bf00 nop
- 8000e1c: 200000b8 .word 0x200000b8
-
-08000e20 :
-
-void SetTxInfinitePreamble() {
- 8000e20: b580 push {r7, lr}
- 8000e22: b082 sub sp, #8
- 8000e24: af00 add r7, sp, #0
- uint8_t txbuf[1] = {0xD2};
- 8000e26: 23d2 movs r3, #210 ; 0xd2
- 8000e28: 713b strb r3, [r7, #4]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf, 0);
- 8000e2a: 7939 ldrb r1, [r7, #4]
- 8000e2c: 1d3a adds r2, r7, #4
- 8000e2e: 2300 movs r3, #0
- 8000e30: 4803 ldr r0, [pc, #12] ; (8000e40 )
- 8000e32: f002 fea7 bl 8003b84
-}
- 8000e36: bf00 nop
- 8000e38: 3708 adds r7, #8
- 8000e3a: 46bd mov sp, r7
- 8000e3c: bd80 pop {r7, pc}
- 8000e3e: bf00 nop
- 8000e40: 200000b8 .word 0x200000b8
- 8000e44: 00000000 .word 0x00000000
-
-08000e48 :
-void SetModulationParamsLora(const uint8_t params[4]) {
- uint8_t txbuf[5] = {0x8B, params[0], params[1], params[2], params[3]};
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-void SetModulationParamsFSK(uint32_t bitrate, uint8_t pulseshape, uint8_t bandwidth, uint32_t freq_dev) {
- 8000e48: b580 push {r7, lr}
- 8000e4a: b08a sub sp, #40 ; 0x28
- 8000e4c: af00 add r7, sp, #0
- 8000e4e: 60f8 str r0, [r7, #12]
- 8000e50: 607b str r3, [r7, #4]
- 8000e52: 460b mov r3, r1
- 8000e54: 72fb strb r3, [r7, #11]
- 8000e56: 4613 mov r3, r2
- 8000e58: 72bb strb r3, [r7, #10]
- uint32_t BR = 32 * 32e6 / bitrate;
- 8000e5a: 68f8 ldr r0, [r7, #12]
- 8000e5c: f7ff face bl 80003fc <__aeabi_ui2d>
- 8000e60: 4602 mov r2, r0
- 8000e62: 460b mov r3, r1
- 8000e64: a122 add r1, pc, #136 ; (adr r1, 8000ef0 )
- 8000e66: e9d1 0100 ldrd r0, r1, [r1]
- 8000e6a: f7ff fc6b bl 8000744 <__aeabi_ddiv>
- 8000e6e: 4602 mov r2, r0
- 8000e70: 460b mov r3, r1
- 8000e72: 4610 mov r0, r2
- 8000e74: 4619 mov r1, r3
- 8000e76: f7ff fd4d bl 8000914 <__aeabi_d2uiz>
- 8000e7a: 4603 mov r3, r0
- 8000e7c: 627b str r3, [r7, #36] ; 0x24
- uint32_t fdev = (uint32_t) (freq_dev * 1.048576L); // 2^25/32e6 = 1.048576
- 8000e7e: 6878 ldr r0, [r7, #4]
- 8000e80: f7ff fabc bl 80003fc <__aeabi_ui2d>
- 8000e84: a31c add r3, pc, #112 ; (adr r3, 8000ef8 )
- 8000e86: e9d3 2300 ldrd r2, r3, [r3]
- 8000e8a: f7ff fb31 bl 80004f0 <__aeabi_dmul>
- 8000e8e: 4602 mov r2, r0
- 8000e90: 460b mov r3, r1
- 8000e92: 4610 mov r0, r2
- 8000e94: 4619 mov r1, r3
- 8000e96: f7ff fd3d bl 8000914 <__aeabi_d2uiz>
- 8000e9a: 4603 mov r3, r0
- 8000e9c: 623b str r3, [r7, #32]
- uint8_t txbuf[9] = {0x8B, (BR & 0x00FF0000) >> 16, (BR & 0x0000FF00) >> 8, BR & 0x000000FF, pulseshape, bandwidth, (fdev & 0x00FF0000) >> 16, (fdev & 0x0000FF00) >> 8, fdev & 0x000000FF};
- 8000e9e: 238b movs r3, #139 ; 0x8b
- 8000ea0: 753b strb r3, [r7, #20]
- 8000ea2: 6a7b ldr r3, [r7, #36] ; 0x24
- 8000ea4: 0c1b lsrs r3, r3, #16
- 8000ea6: b2db uxtb r3, r3
- 8000ea8: 757b strb r3, [r7, #21]
- 8000eaa: 6a7b ldr r3, [r7, #36] ; 0x24
- 8000eac: 0a1b lsrs r3, r3, #8
- 8000eae: b2db uxtb r3, r3
- 8000eb0: 75bb strb r3, [r7, #22]
- 8000eb2: 6a7b ldr r3, [r7, #36] ; 0x24
- 8000eb4: b2db uxtb r3, r3
- 8000eb6: 75fb strb r3, [r7, #23]
- 8000eb8: 7afb ldrb r3, [r7, #11]
- 8000eba: 763b strb r3, [r7, #24]
- 8000ebc: 7abb ldrb r3, [r7, #10]
- 8000ebe: 767b strb r3, [r7, #25]
- 8000ec0: 6a3b ldr r3, [r7, #32]
- 8000ec2: 0c1b lsrs r3, r3, #16
- 8000ec4: b2db uxtb r3, r3
- 8000ec6: 76bb strb r3, [r7, #26]
- 8000ec8: 6a3b ldr r3, [r7, #32]
- 8000eca: 0a1b lsrs r3, r3, #8
- 8000ecc: b2db uxtb r3, r3
- 8000ece: 76fb strb r3, [r7, #27]
- 8000ed0: 6a3b ldr r3, [r7, #32]
- 8000ed2: b2db uxtb r3, r3
- 8000ed4: 773b strb r3, [r7, #28]
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
- 8000ed6: 7d39 ldrb r1, [r7, #20]
- 8000ed8: f107 0214 add.w r2, r7, #20
- 8000edc: 3201 adds r2, #1
- 8000ede: 2308 movs r3, #8
- 8000ee0: 4807 ldr r0, [pc, #28] ; (8000f00 )
- 8000ee2: f002 fe4f bl 8003b84
-}
- 8000ee6: bf00 nop
- 8000ee8: 3728 adds r7, #40 ; 0x28
- 8000eea: 46bd mov sp, r7
- 8000eec: bd80 pop {r7, pc}
- 8000eee: bf00 nop
- 8000ef0: 00000000 .word 0x00000000
- 8000ef4: 41ce8480 .word 0x41ce8480
- 8000ef8: a0b5ed8d .word 0xa0b5ed8d
- 8000efc: 3ff0c6f7 .word 0x3ff0c6f7
- 8000f00: 200000b8 .word 0x200000b8
-
-08000f04 :
-
- HAL_SUBGHZ_ExecSetCmd(&hsubghz, txbuf[0], txbuf+1, sizeof(txbuf)-1);
-}
-
-
-void FSKBeep(int8_t powerdBm, uint32_t toneHz, uint32_t lengthMs) {
- 8000f04: b580 push {r7, lr}
- 8000f06: b084 sub sp, #16
- 8000f08: af00 add r7, sp, #0
- 8000f0a: 4603 mov r3, r0
- 8000f0c: 60b9 str r1, [r7, #8]
- 8000f0e: 607a str r2, [r7, #4]
- 8000f10: 73fb strb r3, [r7, #15]
- // assume in standbyXOSC already.
- HAL_Delay(1);
- 8000f12: 2001 movs r0, #1
- 8000f14: f000 fccc bl 80018b0
- SetTxPower(powerdBm);
- 8000f18: f997 300f ldrsb.w r3, [r7, #15]
- 8000f1c: 4618 mov r0, r3
- 8000f1e: f7ff ff53 bl 8000dc8
- SetModulationParamsFSK(toneHz*2, 0x09, 0x1E, 2500);
- 8000f22: 68bb ldr r3, [r7, #8]
- 8000f24: 0058 lsls r0, r3, #1
- 8000f26: f640 13c4 movw r3, #2500 ; 0x9c4
- 8000f2a: 221e movs r2, #30
- 8000f2c: 2109 movs r1, #9
- 8000f2e: f7ff ff8b bl 8000e48
- HAL_Delay(5);
- 8000f32: 2005 movs r0, #5
- 8000f34: f000 fcbc bl 80018b0
- SetTxInfinitePreamble();
- 8000f38: f7ff ff72 bl 8000e20
- HAL_Delay(lengthMs);
- 8000f3c: 6878 ldr r0, [r7, #4]
- 8000f3e: f000 fcb7 bl 80018b0
- SetStandbyXOSC();
- 8000f42: f7ff feaf bl 8000ca4
- HAL_Delay(5);
- 8000f46: 2005 movs r0, #5
- 8000f48: f000 fcb2 bl 80018b0
-}
- 8000f4c: bf00 nop
- 8000f4e: 3710 adds r7, #16
- 8000f50: 46bd mov sp, r7
- 8000f52: bd80 pop {r7, pc}
-
-08000f54 :
-
-void CWBeep(int8_t powerdBm, uint32_t lengthMs) {
- 8000f54: b580 push {r7, lr}
- 8000f56: b082 sub sp, #8
- 8000f58: af00 add r7, sp, #0
- 8000f5a: 4603 mov r3, r0
- 8000f5c: 6039 str r1, [r7, #0]
- 8000f5e: 71fb strb r3, [r7, #7]
- HAL_Delay(1);
- 8000f60: 2001 movs r0, #1
- 8000f62: f000 fca5 bl 80018b0
- SetTxPower(powerdBm);
- 8000f66: f997 3007 ldrsb.w r3, [r7, #7]
- 8000f6a: 4618 mov r0, r3
- 8000f6c: f7ff ff2c bl 8000dc8
- HAL_Delay(5);
- 8000f70: 2005 movs r0, #5
- 8000f72: f000 fc9d bl 80018b0
- SetContinuousWave();
- 8000f76: f7ff ff41 bl 8000dfc
- HAL_Delay(lengthMs);
- 8000f7a: 6838 ldr r0, [r7, #0]
- 8000f7c: f000 fc98 bl 80018b0
- SetStandbyXOSC();
- 8000f80: f7ff fe90 bl 8000ca4
- HAL_Delay(5);
- 8000f84: 2005 movs r0, #5
- 8000f86: f000 fc93 bl 80018b0
-}
- 8000f8a: bf00 nop
- 8000f8c: 3708 adds r7, #8
- 8000f8e: 46bd mov sp, r7
- 8000f90: bd80 pop {r7, pc}
- ...
-
-08000f94 :
-
-// https://en.wikipedia.org/wiki/Morse_code#/media/File:International_Morse_Code.svg
-uint32_t morse_unit_ms = 100;
-int8_t morse_power = 10;
-
-void play_morse_char(uint8_t ascii_letter, bool use_cw) {
- 8000f94: b580 push {r7, lr}
- 8000f96: b084 sub sp, #16
- 8000f98: af00 add r7, sp, #0
- 8000f9a: 4603 mov r3, r0
- 8000f9c: 460a mov r2, r1
- 8000f9e: 71fb strb r3, [r7, #7]
- 8000fa0: 4613 mov r3, r2
- 8000fa2: 71bb strb r3, [r7, #6]
- uint8_t morse_code = 0b11111111;
- 8000fa4: 23ff movs r3, #255 ; 0xff
- 8000fa6: 73fb strb r3, [r7, #15]
- if (ascii_letter > 31 && ascii_letter < 123) {
- 8000fa8: 79fb ldrb r3, [r7, #7]
- 8000faa: 2b1f cmp r3, #31
- 8000fac: d907 bls.n 8000fbe
- 8000fae: 79fb ldrb r3, [r7, #7]
- 8000fb0: 2b7a cmp r3, #122 ; 0x7a
- 8000fb2: d804 bhi.n 8000fbe
- morse_code = morse_chars[ascii_letter - 32];
- 8000fb4: 79fb ldrb r3, [r7, #7]
- 8000fb6: 3b20 subs r3, #32
- 8000fb8: 4a40 ldr r2, [pc, #256] ; (80010bc )
- 8000fba: 5cd3 ldrb r3, [r2, r3]
- 8000fbc: 73fb strb r3, [r7, #15]
- }
-
- // space
- if (morse_code == 0b11111111) {
- 8000fbe: 7bfb ldrb r3, [r7, #15]
- 8000fc0: 2bff cmp r3, #255 ; 0xff
- 8000fc2: d10e bne.n 8000fe2
- if (use_cw) {
- 8000fc4: 79bb ldrb r3, [r7, #6]
- 8000fc6: 2b00 cmp r3, #0
- 8000fc8: d005 beq.n 8000fd6
- HAL_Delay(morse_unit_ms);
- 8000fca: 4b3d ldr r3, [pc, #244] ; (80010c0 )
- 8000fcc: 681b ldr r3, [r3, #0]
- 8000fce: 4618 mov r0, r3
- 8000fd0: f000 fc6e bl 80018b0
- } else {
- //FSKBeep(morse_power, 750, morse_unit_ms);
- HAL_Delay(morse_unit_ms);
- }
- return;
- 8000fd4: e06f b.n 80010b6
- HAL_Delay(morse_unit_ms);
- 8000fd6: 4b3a ldr r3, [pc, #232] ; (80010c0 )
- 8000fd8: 681b ldr r3, [r3, #0]
- 8000fda: 4618 mov r0, r3
- 8000fdc: f000 fc68 bl 80018b0
- return;
- 8000fe0: e069 b.n 80010b6
- }
- uint8_t terminatelen = 0;
- 8000fe2: 2300 movs r3, #0
- 8000fe4: 73bb strb r3, [r7, #14]
- for (uint8_t idx = 0; idx < 8; idx++) {
- 8000fe6: 2300 movs r3, #0
- 8000fe8: 737b strb r3, [r7, #13]
- 8000fea: e00d b.n 8001008
- if (morse_code & (1 << idx)) {
- 8000fec: 7bfa ldrb r2, [r7, #15]
- 8000fee: 7b7b ldrb r3, [r7, #13]
- 8000ff0: fa42 f303 asr.w r3, r2, r3
- 8000ff4: f003 0301 and.w r3, r3, #1
- 8000ff8: 2b00 cmp r3, #0
- 8000ffa: d002 beq.n 8001002
- terminatelen = idx;
- 8000ffc: 7b7b ldrb r3, [r7, #13]
- 8000ffe: 73bb strb r3, [r7, #14]
- break;
- 8001000: e005 b.n 800100e
- for (uint8_t idx = 0; idx < 8; idx++) {
- 8001002: 7b7b ldrb r3, [r7, #13]
- 8001004: 3301 adds r3, #1
- 8001006: 737b strb r3, [r7, #13]
- 8001008: 7b7b ldrb r3, [r7, #13]
- 800100a: 2b07 cmp r3, #7
- 800100c: d9ee bls.n 8000fec
- }
- }
-
- for (uint8_t i = 7; i > terminatelen; i--) {
- 800100e: 2307 movs r3, #7
- 8001010: 733b strb r3, [r7, #12]
- 8001012: e04c b.n 80010ae
- if (morse_code & (1 << i)) {
- 8001014: 7bfa ldrb r2, [r7, #15]
- 8001016: 7b3b ldrb r3, [r7, #12]
- 8001018: fa42 f303 asr.w r3, r2, r3
- 800101c: f003 0301 and.w r3, r3, #1
- 8001020: 2b00 cmp r3, #0
- 8001022: d01c beq.n 800105e
- // make dat
- //printf("-");
- if (use_cw) {
- 8001024: 79bb ldrb r3, [r7, #6]
- 8001026: 2b00 cmp r3, #0
- 8001028: d00b beq.n 8001042
- CWBeep(morse_power, morse_unit_ms * 3);
- 800102a: 4b26 ldr r3, [pc, #152] ; (80010c4 )
- 800102c: f993 0000 ldrsb.w r0, [r3]
- 8001030: 4b23 ldr r3, [pc, #140] ; (80010c0 )
- 8001032: 681a ldr r2, [r3, #0]
- 8001034: 4613 mov r3, r2
- 8001036: 005b lsls r3, r3, #1
- 8001038: 4413 add r3, r2
- 800103a: 4619 mov r1, r3
- 800103c: f7ff ff8a bl 8000f54
- 8001040: e024 b.n 800108c
- } else {
- FSKBeep(morse_power, 750, morse_unit_ms * 3);
- 8001042: 4b20 ldr r3, [pc, #128] ; (80010c4 )
- 8001044: f993 0000 ldrsb.w r0, [r3]
- 8001048: 4b1d ldr r3, [pc, #116] ; (80010c0 )
- 800104a: 681a ldr r2, [r3, #0]
- 800104c: 4613 mov r3, r2
- 800104e: 005b lsls r3, r3, #1
- 8001050: 4413 add r3, r2
- 8001052: 461a mov r2, r3
- 8001054: f240 21ee movw r1, #750 ; 0x2ee
- 8001058: f7ff ff54 bl 8000f04
- 800105c: e016 b.n 800108c
- }
- } else {
- // make dit
- //printf(".");
- if (use_cw) {
- 800105e: 79bb ldrb r3, [r7, #6]
- 8001060: 2b00 cmp r3, #0
- 8001062: d009 beq.n 8001078
- CWBeep(morse_power, morse_unit_ms);
- 8001064: 4b17 ldr r3, [pc, #92] ; (80010c4 )
- 8001066: f993 3000 ldrsb.w r3, [r3]
- 800106a: 4a15 ldr r2, [pc, #84] ; (80010c0 )
- 800106c: 6812 ldr r2, [r2, #0]
- 800106e: 4611 mov r1, r2
- 8001070: 4618 mov r0, r3
- 8001072: f7ff ff6f bl 8000f54
- 8001076: e009 b.n 800108c
- } else {
- FSKBeep(morse_power, 750, morse_unit_ms);
- 8001078: 4b12 ldr r3, [pc, #72] ; (80010c4 )
- 800107a: f993 3000 ldrsb.w r3, [r3]
- 800107e: 4a10 ldr r2, [pc, #64] ; (80010c0 )
- 8001080: 6812 ldr r2, [r2, #0]
- 8001082: f240 21ee movw r1, #750 ; 0x2ee
- 8001086: 4618 mov r0, r3
- 8001088: f7ff ff3c bl 8000f04
- }
- }
-
- // Make delay.
- if (use_cw) {
- 800108c: 79bb ldrb r3, [r7, #6]
- 800108e: 2b00 cmp r3, #0
- 8001090: d005 beq.n 800109e
- HAL_Delay(morse_unit_ms);
- 8001092: 4b0b ldr r3, [pc, #44] ; (80010c0 )
- 8001094: 681b ldr r3, [r3, #0]
- 8001096: 4618 mov r0, r3
- 8001098: f000 fc0a bl 80018b0
- 800109c: e004 b.n 80010a8
- } else {
- HAL_Delay(morse_unit_ms);
- 800109e: 4b08 ldr r3, [pc, #32] ; (80010c0 )
- 80010a0: 681b ldr r3, [r3, #0]
- 80010a2: 4618 mov r0, r3
- 80010a4: f000 fc04 bl 80018b0
- for (uint8_t i = 7; i > terminatelen; i--) {
- 80010a8: 7b3b ldrb r3, [r7, #12]
- 80010aa: 3b01 subs r3, #1
- 80010ac: 733b strb r3, [r7, #12]
- 80010ae: 7b3a ldrb r2, [r7, #12]
- 80010b0: 7bbb ldrb r3, [r7, #14]
- 80010b2: 429a cmp r2, r3
- 80010b4: d8ae bhi.n 8001014
- //CWBeep(morse_power, morse_unit_ms);
- }
- }
-}
- 80010b6: 3710 adds r7, #16
- 80010b8: 46bd mov sp, r7
- 80010ba: bd80 pop {r7, pc}
- 80010bc: 080049b8 .word 0x080049b8
- 80010c0: 20000000 .word 0x20000000
- 80010c4: 20000004 .word 0x20000004
-
-080010c8 :
-
-void play_morse_word(uint8_t* letters, uint8_t len, bool use_cw) {
- 80010c8: b580 push {r7, lr}
- 80010ca: b084 sub sp, #16
- 80010cc: af00 add r7, sp, #0
- 80010ce: 6078 str r0, [r7, #4]
- 80010d0: 460b mov r3, r1
- 80010d2: 70fb strb r3, [r7, #3]
- 80010d4: 4613 mov r3, r2
- 80010d6: 70bb strb r3, [r7, #2]
- for (uint8_t i = 0; i < len; i++) {
- 80010d8: 2300 movs r3, #0
- 80010da: 73fb strb r3, [r7, #15]
- 80010dc: e01f b.n 800111e
- play_morse_char(letters[i], use_cw);
- 80010de: 7bfb ldrb r3, [r7, #15]
- 80010e0: 687a ldr r2, [r7, #4]
- 80010e2: 4413 add r3, r2
- 80010e4: 781b ldrb r3, [r3, #0]
- 80010e6: 78ba ldrb r2, [r7, #2]
- 80010e8: 4611 mov r1, r2
- 80010ea: 4618 mov r0, r3
- 80010ec: f7ff ff52 bl 8000f94
-
- // Space between letters
- if (use_cw) {
- 80010f0: 78bb ldrb r3, [r7, #2]
- 80010f2: 2b00 cmp r3, #0
- 80010f4: d008 beq.n 8001108
- HAL_Delay(morse_unit_ms * 3);
- 80010f6: 4b0e ldr r3, [pc, #56] ; (8001130 )
- 80010f8: 681a ldr r2, [r3, #0]
- 80010fa: 4613 mov r3, r2
- 80010fc: 005b lsls r3, r3, #1
- 80010fe: 4413 add r3, r2
- 8001100: 4618 mov r0, r3
- 8001102: f000 fbd5 bl 80018b0
- 8001106: e007 b.n 8001118
- } else {
- //CWBeep(morse_power, morse_unit_ms);
- HAL_Delay(morse_unit_ms * 3);
- 8001108: 4b09 ldr r3, [pc, #36] ; (8001130 )
- 800110a: 681a ldr r2, [r3, #0]
- 800110c: 4613 mov r3, r2
- 800110e: 005b lsls r3, r3, #1
- 8001110: 4413 add r3, r2
- 8001112: 4618 mov r0, r3
- 8001114: f000 fbcc bl 80018b0
- for (uint8_t i = 0; i < len; i++) {
- 8001118: 7bfb ldrb r3, [r7, #15]
- 800111a: 3301 adds r3, #1
- 800111c: 73fb strb r3, [r7, #15]
- 800111e: 7bfa ldrb r2, [r7, #15]
- 8001120: 78fb ldrb r3, [r7, #3]
- 8001122: 429a cmp r2, r3
- 8001124: d3db bcc.n 80010de
- }
- }
-}
- 8001126: bf00 nop
- 8001128: bf00 nop
- 800112a: 3710 adds r7, #16
- 800112c: 46bd mov sp, r7
- 800112e: bd80 pop {r7, pc}
- 8001130: 20000000 .word 0x20000000
- 8001134: 00000000 .word 0x00000000
-
-08001138 :
+ 8000ca6: af00 add r7, sp, #0
+ HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
+ 8000ca8: 2201 movs r2, #1
+ 8000caa: f44f 7100 mov.w r1, #512 ; 0x200
+ 8000cae: f04f 4090 mov.w r0, #1207959552 ; 0x48000000
+ 8000cb2: f001 fa6f bl 8002194
+}
+ 8000cb6: bf00 nop
+ 8000cb8: bd80 pop {r7, pc}
+
+08000cba :
+void LED_off() {
+ 8000cba: b580 push {r7, lr}
+ 8000cbc: af00 add r7, sp, #0
+ HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);
+ 8000cbe: 2200 movs r2, #0
+ 8000cc0: f44f 7100 mov.w r1, #512 ; 0x200
+ 8000cc4: f04f 4090 mov.w r0, #1207959552 ; 0x48000000
+ 8000cc8: f001 fa64 bl 8002194
+}
+ 8000ccc: bf00 nop
+ 8000cce: bd80 pop {r7, pc}
+
+08000cd0 :
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
- 8001138: b580 push {r7, lr}
- 800113a: b086 sub sp, #24
- 800113c: af00 add r7, sp, #0
+ 8000cd0: b580 push {r7, lr}
+ 8000cd2: b084 sub sp, #16
+ 8000cd4: af00 add r7, sp, #0
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
- 800113e: f000 fb41 bl 80017c4
+ 8000cd6: f000 fc7b bl 80015d0
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
- 8001142: f000 f87f bl 8001244
+ 8000cda: f000 f875 bl 8000dc8
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
- 8001146: f000 f99f bl 8001488
+ 8000cde: f000 f995 bl 800100c
MX_ADC_Init();
- 800114a: f000 f8cf bl 80012ec
+ 8000ce2: f000 f8c5 bl 8000e70
MX_SUBGHZ_Init();
- 800114e: f000 f93d bl 80013cc
+ 8000ce6: f000 f933 bl 8000f50
MX_USART2_UART_Init();
- 8001152: f000 f94d bl 80013f0
+ 8000cea: f000 f943 bl 8000f74
MX_CRC_Init();
- 8001156: f000 f917 bl 8001388
+ 8000cee: f000 f90d bl 8000f0c
/* USER CODE BEGIN 2 */
//EE_Status ee_status = EE_OK;
-
- HAL_Delay(1000); // initial start
- 800115a: f44f 707a mov.w r0, #1000 ; 0x3e8
- 800115e: f000 fba7 bl 80018b0
+ HAL_Delay(6000); // initial start
+ 8000cf2: f241 7070 movw r0, #6000 ; 0x1770
+ 8000cf6: f000 fce1 bl 80016bc
SetStandbyXOSC();
- 8001162: f7ff fd9f bl 8000ca4
+ 8000cfa: f000 f9cf bl 800109c
HAL_Delay(1);
- 8001166: 2001 movs r0, #1
- 8001168: f000 fba2 bl 80018b0
+ 8000cfe: 2001 movs r0, #1
+ 8000d00: f000 fcdc bl 80016bc
SetPacketTypeLora();
- 800116c: f7ff fdae bl 8000ccc
+ 8000d04: f000 f9de bl 80010c4
HAL_Delay(1);
- 8001170: 2001 movs r0, #1
- 8001172: f000 fb9d bl 80018b0
- //SetPaLowPower();
- SetPa22dB();
- 8001176: f7ff fe0d bl 8000d94
+ 8000d08: 2001 movs r0, #1
+ 8000d0a: f000 fcd7 bl 80016bc
+
+ //SetPaLowPower(); // For powers up to 14 dBm
+ SetPa22dB(); // Uncomment for powers up to 22 dBm
+ 8000d0e: f000 fa3d bl 800118c
HAL_Delay(1);
- 800117a: 2001 movs r0, #1
- 800117c: f000 fb98 bl 80018b0
+ 8000d12: 2001 movs r0, #1
+ 8000d14: f000 fcd2 bl 80016bc
SetTxPower(-9);
- 8001180: f06f 0008 mvn.w r0, #8
- 8001184: f7ff fe20 bl 8000dc8
+ 8000d18: f06f 0008 mvn.w r0, #8
+ 8000d1c: f000 fa50 bl 80011c0
HAL_Delay(1);
- 8001188: 2001 movs r0, #1
- 800118a: f000 fb91 bl 80018b0
+ 8000d20: 2001 movs r0, #1
+ 8000d22: f000 fccb bl 80016bc
SetPacketTypeFSK();
- 800118e: f7ff fdb1 bl 8000cf4
-
- SetModulationParamsFSK(2000, 0x09, 0x1E, 3000);
- 8001192: f640 33b8 movw r3, #3000 ; 0xbb8
- 8001196: 221e movs r2, #30
- 8001198: 2109 movs r1, #9
- 800119a: f44f 60fa mov.w r0, #2000 ; 0x7d0
- 800119e: f7ff fe53 bl 8000e48
-
- double center_freq = 446.14375;
- 80011a2: a325 add r3, pc, #148 ; (adr r3, 8001238 )
- 80011a4: e9d3 2300 ldrd r2, r3, [r3]
- 80011a8: e9c7 2304 strd r2, r3, [r7, #16]
-
- SetRfFreq(ComputeRfFreq(center_freq));
- 80011ac: e9d7 0104 ldrd r0, r1, [r7, #16]
- 80011b0: f7ff fdb2 bl 8000d18
- 80011b4: 4603 mov r3, r0
- 80011b6: 4618 mov r0, r3
- 80011b8: f7ff fdc8 bl 8000d4c
-
- /* Infinite loop */
- /* USER CODE BEGIN WHILE */
+ 8000d26: f000 f9e1 bl 80010ec
+
+ SetModulationParamsFSK(2000, 0x09, 0x1E, 2500);
+ 8000d2a: f640 13c4 movw r3, #2500 ; 0x9c4
+ 8000d2e: 221e movs r2, #30
+ 8000d30: 2109 movs r1, #9
+ 8000d32: f44f 60fa mov.w r0, #2000 ; 0x7d0
+ 8000d36: f000 fa6f bl 8001218
+
+ // Frequency setting in MHz
+ double center_freq = PMR446[13-1] ;//434.700;
+ 8000d3a: a31f add r3, pc, #124 ; (adr r3, 8000db8 )
+ 8000d3c: e9d3 2300 ldrd r2, r3, [r3]
+ 8000d40: e9c7 2302 strd r2, r3, [r7, #8]
+ //double center_freq = 223.010;
+ double freq_correction = 0.99999539941; // Try trimming caps
+ 8000d44: a31e add r3, pc, #120 ; (adr r3, 8000dc0 )
+ 8000d46: e9d3 2300 ldrd r2, r3, [r3]
+ 8000d4a: e9c7 2300 strd r2, r3, [r7]
+
+ SetRfFreq(ComputeRfFreq(center_freq * freq_correction));
+ 8000d4e: e9d7 2300 ldrd r2, r3, [r7]
+ 8000d52: e9d7 0102 ldrd r0, r1, [r7, #8]
+ 8000d56: f7ff fbcb bl 80004f0 <__aeabi_dmul>
+ 8000d5a: 4602 mov r2, r0
+ 8000d5c: 460b mov r3, r1
+ 8000d5e: 4610 mov r0, r2
+ 8000d60: 4619 mov r1, r3
+ 8000d62: f000 f9d5 bl 8001110
+ 8000d66: 4603 mov r3, r0
+ 8000d68: 4618 mov r0, r3
+ 8000d6a: f000 f9eb bl 8001144
+ HAL_Delay(1000);
+ }*/
+
while (1)
{
- HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);
- 80011bc: 2201 movs r2, #1
- 80011be: f44f 7100 mov.w r1, #512 ; 0x200
- 80011c2: f04f 4090 mov.w r0, #1207959552 ; 0x48000000
- 80011c6: f001 f8df bl 8002388
+ LED_on();
+ 8000d6e: f7ff ff99 bl 8000ca4
FSKBeep(-9, 500, 200);
- 80011ca: 22c8 movs r2, #200 ; 0xc8
- 80011cc: f44f 71fa mov.w r1, #500 ; 0x1f4
- 80011d0: f06f 0008 mvn.w r0, #8
- 80011d4: f7ff fe96 bl 8000f04
+ 8000d72: 22c8 movs r2, #200 ; 0xc8
+ 8000d74: f44f 71fa mov.w r1, #500 ; 0x1f4
+ 8000d78: f06f 0008 mvn.w r0, #8
+ 8000d7c: f000 faaa bl 80012d4
HAL_Delay(50);
- 80011d8: 2032 movs r0, #50 ; 0x32
- 80011da: f000 fb69 bl 80018b0
+ 8000d80: 2032 movs r0, #50 ; 0x32
+ 8000d82: f000 fc9b bl 80016bc
FSKBeep(2, 750, 200);
- 80011de: 22c8 movs r2, #200 ; 0xc8
- 80011e0: f240 21ee movw r1, #750 ; 0x2ee
- 80011e4: 2002 movs r0, #2
- 80011e6: f7ff fe8d bl 8000f04
+ 8000d86: 22c8 movs r2, #200 ; 0xc8
+ 8000d88: f240 21ee movw r1, #750 ; 0x2ee
+ 8000d8c: 2002 movs r0, #2
+ 8000d8e: f000 faa1 bl 80012d4
HAL_Delay(50);
- 80011ea: 2032 movs r0, #50 ; 0x32
- 80011ec: f000 fb60 bl 80018b0
-
- FSKBeep(10, 1000, 200);
- 80011f0: 22c8 movs r2, #200 ; 0xc8
- 80011f2: f44f 717a mov.w r1, #1000 ; 0x3e8
- 80011f6: 200a movs r0, #10
- 80011f8: f7ff fe84 bl 8000f04
+ 8000d92: 2032 movs r0, #50 ; 0x32
+ 8000d94: f000 fc92 bl 80016bc
+
+ FSKBeep(14, 1000, 200);
+ 8000d98: 22c8 movs r2, #200 ; 0xc8
+ 8000d9a: f44f 717a mov.w r1, #1000 ; 0x3e8
+ 8000d9e: 200e movs r0, #14
+ 8000da0: f000 fa98 bl 80012d4
HAL_Delay(50);
- 80011fc: 2032 movs r0, #50 ; 0x32
- 80011fe: f000 fb57 bl 80018b0
-
- HAL_Delay(1000);
- 8001202: f44f 707a mov.w r0, #1000 ; 0x3e8
- 8001206: f000 fb53 bl 80018b0
- uint8_t callsign[] = "CALLSIGN";
- 800120a: 4a0d ldr r2, [pc, #52] ; (8001240 )
- 800120c: 1d3b adds r3, r7, #4
- 800120e: ca07 ldmia r2, {r0, r1, r2}
- 8001210: c303 stmia r3!, {r0, r1}
- 8001212: 701a strb r2, [r3, #0]
- play_morse_word(callsign, sizeof(callsign)-1, false);
- 8001214: 1d3b adds r3, r7, #4
- 8001216: 2200 movs r2, #0
- 8001218: 2108 movs r1, #8
- 800121a: 4618 mov r0, r3
- 800121c: f7ff ff54 bl 80010c8
-
- HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);
- 8001220: 2200 movs r2, #0
- 8001222: f44f 7100 mov.w r1, #512 ; 0x200
- 8001226: f04f 4090 mov.w r0, #1207959552 ; 0x48000000
- 800122a: f001 f8ad bl 8002388
-
- HAL_Delay(3000);
- 800122e: f640 30b8 movw r0, #3000 ; 0xbb8
- 8001232: f000 fb3d bl 80018b0
- {
- 8001236: e7c1 b.n 80011bc
- 8001238: cccccccd .word 0xcccccccd
- 800123c: 407be24c .word 0x407be24c
- 8001240: 08004990 .word 0x08004990
-
-08001244 :
+ 8000da4: 2032 movs r0, #50 ; 0x32
+ 8000da6: f000 fc89 bl 80016bc
+ //HAL_Delay(1000);
+ //uint8_t callsign[] = "HI";
+ //play_morse_word(callsign, sizeof(callsign)-1, false);
+
+
+ LED_off();
+ 8000daa: f7ff ff86 bl 8000cba
+
+ HAL_Delay(4000);
+ 8000dae: f44f 607a mov.w r0, #4000 ; 0xfa0
+ 8000db2: f000 fc83 bl 80016bc
+ LED_on();
+ 8000db6: e7da b.n 8000d6e
+ 8000db8: 00000000 .word 0x00000000
+ 8000dbc: 407be280 .word 0x407be280
+ 8000dc0: 5a13b99d .word 0x5a13b99d
+ 8000dc4: 3feffff6 .word 0x3feffff6
+
+08000dc8 :
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
- 8001244: b580 push {r7, lr}
- 8001246: b09a sub sp, #104 ; 0x68
- 8001248: af00 add r7, sp, #0
+ 8000dc8: b580 push {r7, lr}
+ 8000dca: b09a sub sp, #104 ; 0x68
+ 8000dcc: af00 add r7, sp, #0
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- 800124a: f107 0320 add.w r3, r7, #32
- 800124e: 2248 movs r2, #72 ; 0x48
- 8001250: 2100 movs r1, #0
- 8001252: 4618 mov r0, r3
- 8001254: f003 fb80 bl 8004958
+ 8000dce: f107 0320 add.w r3, r7, #32
+ 8000dd2: 2248 movs r2, #72 ; 0x48
+ 8000dd4: 2100 movs r1, #0
+ 8000dd6: 4618 mov r0, r3
+ 8000dd8: f003 fcc4 bl 8004764
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- 8001258: f107 0308 add.w r3, r7, #8
- 800125c: 2200 movs r2, #0
- 800125e: 601a str r2, [r3, #0]
- 8001260: 605a str r2, [r3, #4]
- 8001262: 609a str r2, [r3, #8]
- 8001264: 60da str r2, [r3, #12]
- 8001266: 611a str r2, [r3, #16]
- 8001268: 615a str r2, [r3, #20]
+ 8000ddc: f107 0308 add.w r3, r7, #8
+ 8000de0: 2200 movs r2, #0
+ 8000de2: 601a str r2, [r3, #0]
+ 8000de4: 605a str r2, [r3, #4]
+ 8000de6: 609a str r2, [r3, #8]
+ 8000de8: 60da str r2, [r3, #12]
+ 8000dea: 611a str r2, [r3, #16]
+ 8000dec: 615a str r2, [r3, #20]
/** Configure the main internal regulator output voltage
*/
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
- 800126a: 4b1f ldr r3, [pc, #124] ; (80012e8 )
- 800126c: 681b ldr r3, [r3, #0]
- 800126e: f423 63c0 bic.w r3, r3, #1536 ; 0x600
- 8001272: 4a1d ldr r2, [pc, #116] ; (80012e8 )
- 8001274: f443 6380 orr.w r3, r3, #1024 ; 0x400
- 8001278: 6013 str r3, [r2, #0]
- 800127a: 4b1b ldr r3, [pc, #108] ; (80012e8 )
- 800127c: 681b ldr r3, [r3, #0]
- 800127e: f403 63c0 and.w r3, r3, #1536 ; 0x600
- 8001282: 607b str r3, [r7, #4]
- 8001284: 687b ldr r3, [r7, #4]
+ 8000dee: 4b1f ldr r3, [pc, #124] ; (8000e6c )
+ 8000df0: 681b ldr r3, [r3, #0]
+ 8000df2: f423 63c0 bic.w r3, r3, #1536 ; 0x600
+ 8000df6: 4a1d ldr r2, [pc, #116] ; (8000e6c )
+ 8000df8: f443 6380 orr.w r3, r3, #1024 ; 0x400
+ 8000dfc: 6013 str r3, [r2, #0]
+ 8000dfe: 4b1b ldr r3, [pc, #108] ; (8000e6c )
+ 8000e00: 681b ldr r3, [r3, #0]
+ 8000e02: f403 63c0 and.w r3, r3, #1536 ; 0x600
+ 8000e06: 607b str r3, [r7, #4]
+ 8000e08: 687b ldr r3, [r7, #4]
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
- 8001286: 2301 movs r3, #1
- 8001288: 623b str r3, [r7, #32]
+ 8000e0a: 2301 movs r3, #1
+ 8000e0c: 623b str r3, [r7, #32]
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- 800128a: f44f 3380 mov.w r3, #65536 ; 0x10000
- 800128e: 627b str r3, [r7, #36] ; 0x24
+ 8000e0e: f44f 3380 mov.w r3, #65536 ; 0x10000
+ 8000e12: 627b str r3, [r7, #36] ; 0x24
RCC_OscInitStruct.HSEDiv = RCC_HSE_DIV2;
- 8001290: f44f 1380 mov.w r3, #1048576 ; 0x100000
- 8001294: 62bb str r3, [r7, #40] ; 0x28
+ 8000e14: f44f 1380 mov.w r3, #1048576 ; 0x100000
+ 8000e18: 62bb str r3, [r7, #40] ; 0x28
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
- 8001296: 2300 movs r3, #0
- 8001298: 64fb str r3, [r7, #76] ; 0x4c
+ 8000e1a: 2300 movs r3, #0
+ 8000e1c: 64fb str r3, [r7, #76] ; 0x4c
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- 800129a: f107 0320 add.w r3, r7, #32
- 800129e: 4618 mov r0, r3
- 80012a0: f001 fb34 bl 800290c
- 80012a4: 4603 mov r3, r0
- 80012a6: 2b00 cmp r3, #0
- 80012a8: d001 beq.n 80012ae
+ 8000e1e: f107 0320 add.w r3, r7, #32
+ 8000e22: 4618 mov r0, r3
+ 8000e24: f001 fc78 bl 8002718
+ 8000e28: 4603 mov r3, r0
+ 8000e2a: 2b00 cmp r3, #0
+ 8000e2c: d001 beq.n 8000e32
{
Error_Handler();
- 80012aa: f000 f935 bl 8001518
+ 8000e2e: f000 fa79 bl 8001324
}
/** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK3|RCC_CLOCKTYPE_HCLK
- 80012ae: 234f movs r3, #79 ; 0x4f
- 80012b0: 60bb str r3, [r7, #8]
+ 8000e32: 234f movs r3, #79 ; 0x4f
+ 8000e34: 60bb str r3, [r7, #8]
|RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1
|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE;
- 80012b2: 2302 movs r3, #2
- 80012b4: 60fb str r3, [r7, #12]
+ 8000e36: 2302 movs r3, #2
+ 8000e38: 60fb str r3, [r7, #12]
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV16;
- 80012b6: 23b0 movs r3, #176 ; 0xb0
- 80012b8: 613b str r3, [r7, #16]
+ 8000e3a: 23b0 movs r3, #176 ; 0xb0
+ 8000e3c: 613b str r3, [r7, #16]
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- 80012ba: 2300 movs r3, #0
- 80012bc: 617b str r3, [r7, #20]
+ 8000e3e: 2300 movs r3, #0
+ 8000e40: 617b str r3, [r7, #20]
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- 80012be: 2300 movs r3, #0
- 80012c0: 61bb str r3, [r7, #24]
+ 8000e42: 2300 movs r3, #0
+ 8000e44: 61bb str r3, [r7, #24]
RCC_ClkInitStruct.AHBCLK3Divider = RCC_SYSCLK_DIV16;
- 80012c2: 23b0 movs r3, #176 ; 0xb0
- 80012c4: 61fb str r3, [r7, #28]
+ 8000e46: 23b0 movs r3, #176 ; 0xb0
+ 8000e48: 61fb str r3, [r7, #28]
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
- 80012c6: f107 0308 add.w r3, r7, #8
- 80012ca: 2100 movs r1, #0
- 80012cc: 4618 mov r0, r3
- 80012ce: f001 fe9f bl 8003010
- 80012d2: 4603 mov r3, r0
- 80012d4: 2b00 cmp r3, #0
- 80012d6: d001 beq.n 80012dc
+ 8000e4a: f107 0308 add.w r3, r7, #8
+ 8000e4e: 2100 movs r1, #0
+ 8000e50: 4618 mov r0, r3
+ 8000e52: f001 ffe3 bl 8002e1c
+ 8000e56: 4603 mov r3, r0
+ 8000e58: 2b00 cmp r3, #0
+ 8000e5a: d001 beq.n 8000e60
{
Error_Handler();
- 80012d8: f000 f91e bl 8001518
+ 8000e5c: f000 fa62 bl 8001324
}
/** Enable the HSE Prescaler
*/
__HAL_RCC_HSE_DIV2_ENABLE();
- 80012dc: f7ff fcbc bl 8000c58
+ 8000e60: f7ff fefa bl 8000c58
}
- 80012e0: bf00 nop
- 80012e2: 3768 adds r7, #104 ; 0x68
- 80012e4: 46bd mov sp, r7
- 80012e6: bd80 pop {r7, pc}
- 80012e8: 58000400 .word 0x58000400
+ 8000e64: bf00 nop
+ 8000e66: 3768 adds r7, #104 ; 0x68
+ 8000e68: 46bd mov sp, r7
+ 8000e6a: bd80 pop {r7, pc}
+ 8000e6c: 58000400 .word 0x58000400
-080012ec :
+08000e70 :
* @brief ADC Initialization Function
* @param None
* @retval None
*/
static void MX_ADC_Init(void)
{
- 80012ec: b580 push {r7, lr}
- 80012ee: af00 add r7, sp, #0
+ 8000e70: b580 push {r7, lr}
+ 8000e72: af00 add r7, sp, #0
/* USER CODE END ADC_Init 1 */
/** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
*/
hadc.Instance = ADC;
- 80012f0: 4b23 ldr r3, [pc, #140] ; (8001380 )
- 80012f2: 4a24 ldr r2, [pc, #144] ; (8001384 )
- 80012f4: 601a str r2, [r3, #0]
+ 8000e74: 4b23 ldr r3, [pc, #140] ; (8000f04 )
+ 8000e76: 4a24 ldr r2, [pc, #144] ; (8000f08 )
+ 8000e78: 601a str r2, [r3, #0]
hadc.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2;
- 80012f6: 4b22 ldr r3, [pc, #136] ; (8001380 )
- 80012f8: f04f 4280 mov.w r2, #1073741824 ; 0x40000000
- 80012fc: 605a str r2, [r3, #4]
+ 8000e7a: 4b22 ldr r3, [pc, #136] ; (8000f04 )
+ 8000e7c: f04f 4280 mov.w r2, #1073741824 ; 0x40000000
+ 8000e80: 605a str r2, [r3, #4]
hadc.Init.Resolution = ADC_RESOLUTION_12B;
- 80012fe: 4b20 ldr r3, [pc, #128] ; (8001380 )
- 8001300: 2200 movs r2, #0
- 8001302: 609a str r2, [r3, #8]
+ 8000e82: 4b20 ldr r3, [pc, #128] ; (8000f04 )
+ 8000e84: 2200 movs r2, #0
+ 8000e86: 609a str r2, [r3, #8]
hadc.Init.DataAlign = ADC_DATAALIGN_RIGHT;
- 8001304: 4b1e ldr r3, [pc, #120] ; (8001380 )
- 8001306: 2200 movs r2, #0
- 8001308: 60da str r2, [r3, #12]
+ 8000e88: 4b1e ldr r3, [pc, #120] ; (8000f04 )
+ 8000e8a: 2200 movs r2, #0
+ 8000e8c: 60da str r2, [r3, #12]
hadc.Init.ScanConvMode = ADC_SCAN_DISABLE;
- 800130a: 4b1d ldr r3, [pc, #116] ; (8001380 )
- 800130c: 2200 movs r2, #0
- 800130e: 611a str r2, [r3, #16]
+ 8000e8e: 4b1d ldr r3, [pc, #116] ; (8000f04 )
+ 8000e90: 2200 movs r2, #0
+ 8000e92: 611a str r2, [r3, #16]
hadc.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
- 8001310: 4b1b ldr r3, [pc, #108] ; (8001380 )
- 8001312: 2204 movs r2, #4
- 8001314: 615a str r2, [r3, #20]
+ 8000e94: 4b1b ldr r3, [pc, #108] ; (8000f04 )
+ 8000e96: 2204 movs r2, #4
+ 8000e98: 615a str r2, [r3, #20]
hadc.Init.LowPowerAutoWait = DISABLE;
- 8001316: 4b1a ldr r3, [pc, #104] ; (8001380 )
- 8001318: 2200 movs r2, #0
- 800131a: 761a strb r2, [r3, #24]
+ 8000e9a: 4b1a ldr r3, [pc, #104] ; (8000f04 )
+ 8000e9c: 2200 movs r2, #0
+ 8000e9e: 761a strb r2, [r3, #24]
hadc.Init.LowPowerAutoPowerOff = DISABLE;
- 800131c: 4b18 ldr r3, [pc, #96] ; (8001380 )
- 800131e: 2200 movs r2, #0
- 8001320: 765a strb r2, [r3, #25]
+ 8000ea0: 4b18 ldr r3, [pc, #96] ; (8000f04 )
+ 8000ea2: 2200 movs r2, #0
+ 8000ea4: 765a strb r2, [r3, #25]
hadc.Init.ContinuousConvMode = DISABLE;
- 8001322: 4b17 ldr r3, [pc, #92] ; (8001380 )
- 8001324: 2200 movs r2, #0
- 8001326: 769a strb r2, [r3, #26]
+ 8000ea6: 4b17 ldr r3, [pc, #92] ; (8000f04 )
+ 8000ea8: 2200 movs r2, #0
+ 8000eaa: 769a strb r2, [r3, #26]
hadc.Init.NbrOfConversion = 1;
- 8001328: 4b15 ldr r3, [pc, #84] ; (8001380 )
- 800132a: 2201 movs r2, #1
- 800132c: 61da str r2, [r3, #28]
+ 8000eac: 4b15 ldr r3, [pc, #84] ; (8000f04 )
+ 8000eae: 2201 movs r2, #1
+ 8000eb0: 61da str r2, [r3, #28]
hadc.Init.DiscontinuousConvMode = DISABLE;
- 800132e: 4b14 ldr r3, [pc, #80] ; (8001380 )
- 8001330: 2200 movs r2, #0
- 8001332: f883 2020 strb.w r2, [r3, #32]
+ 8000eb2: 4b14 ldr r3, [pc, #80] ; (8000f04 )
+ 8000eb4: 2200 movs r2, #0
+ 8000eb6: f883 2020 strb.w r2, [r3, #32]
hadc.Init.ExternalTrigConv = ADC_SOFTWARE_START;
- 8001336: 4b12 ldr r3, [pc, #72] ; (8001380 )
- 8001338: 2200 movs r2, #0
- 800133a: 625a str r2, [r3, #36] ; 0x24
+ 8000eba: 4b12 ldr r3, [pc, #72] ; (8000f04 )
+ 8000ebc: 2200 movs r2, #0
+ 8000ebe: 625a str r2, [r3, #36] ; 0x24
hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
- 800133c: 4b10 ldr r3, [pc, #64] ; (8001380 )
- 800133e: 2200 movs r2, #0
- 8001340: 629a str r2, [r3, #40] ; 0x28
+ 8000ec0: 4b10 ldr r3, [pc, #64] ; (8000f04 )
+ 8000ec2: 2200 movs r2, #0
+ 8000ec4: 629a str r2, [r3, #40] ; 0x28
hadc.Init.DMAContinuousRequests = DISABLE;
- 8001342: 4b0f ldr r3, [pc, #60] ; (8001380 )
- 8001344: 2200 movs r2, #0
- 8001346: f883 202c strb.w r2, [r3, #44] ; 0x2c
+ 8000ec6: 4b0f ldr r3, [pc, #60] ; (8000f04 )
+ 8000ec8: 2200 movs r2, #0
+ 8000eca: f883 202c strb.w r2, [r3, #44] ; 0x2c
hadc.Init.Overrun = ADC_OVR_DATA_PRESERVED;
- 800134a: 4b0d ldr r3, [pc, #52] ; (8001380 )
- 800134c: 2200 movs r2, #0
- 800134e: 631a str r2, [r3, #48] ; 0x30
+ 8000ece: 4b0d ldr r3, [pc, #52] ; (8000f04 )
+ 8000ed0: 2200 movs r2, #0
+ 8000ed2: 631a str r2, [r3, #48] ; 0x30
hadc.Init.SamplingTimeCommon1 = ADC_SAMPLETIME_1CYCLE_5;
- 8001350: 4b0b ldr r3, [pc, #44] ; (8001380 )
- 8001352: 2200 movs r2, #0
- 8001354: 635a str r2, [r3, #52] ; 0x34
+ 8000ed4: 4b0b ldr r3, [pc, #44] ; (8000f04 )
+ 8000ed6: 2200 movs r2, #0
+ 8000ed8: 635a str r2, [r3, #52] ; 0x34
hadc.Init.SamplingTimeCommon2 = ADC_SAMPLETIME_1CYCLE_5;
- 8001356: 4b0a ldr r3, [pc, #40] ; (8001380 )
- 8001358: 2200 movs r2, #0
- 800135a: 639a str r2, [r3, #56] ; 0x38
+ 8000eda: 4b0a ldr r3, [pc, #40] ; (8000f04 )
+ 8000edc: 2200 movs r2, #0
+ 8000ede: 639a str r2, [r3, #56] ; 0x38
hadc.Init.OversamplingMode = DISABLE;
- 800135c: 4b08 ldr r3, [pc, #32] ; (8001380 )
- 800135e: 2200 movs r2, #0
- 8001360: f883 203c strb.w r2, [r3, #60] ; 0x3c
+ 8000ee0: 4b08 ldr r3, [pc, #32] ; (8000f04 )
+ 8000ee2: 2200 movs r2, #0
+ 8000ee4: f883 203c strb.w r2, [r3, #60] ; 0x3c
hadc.Init.TriggerFrequencyMode = ADC_TRIGGER_FREQ_HIGH;
- 8001364: 4b06 ldr r3, [pc, #24] ; (8001380 )
- 8001366: 2200 movs r2, #0
- 8001368: 64da str r2, [r3, #76] ; 0x4c
+ 8000ee8: 4b06 ldr r3, [pc, #24] ; (8000f04 )
+ 8000eea: 2200 movs r2, #0
+ 8000eec: 64da str r2, [r3, #76] ; 0x4c
if (HAL_ADC_Init(&hadc) != HAL_OK)
- 800136a: 4805 ldr r0, [pc, #20] ; (8001380 )
- 800136c: f000 fb44 bl 80019f8
- 8001370: 4603 mov r3, r0
- 8001372: 2b00 cmp r3, #0
- 8001374: d001 beq.n 800137a
+ 8000eee: 4805 ldr r0, [pc, #20] ; (8000f04 )
+ 8000ef0: f000 fc88 bl 8001804
+ 8000ef4: 4603 mov r3, r0
+ 8000ef6: 2b00 cmp r3, #0
+ 8000ef8: d001 beq.n 8000efe
{
Error_Handler();
- 8001376: f000 f8cf bl 8001518
+ 8000efa: f000 fa13 bl 8001324
}
/* USER CODE BEGIN ADC_Init 2 */
/* USER CODE END ADC_Init 2 */
}
- 800137a: bf00 nop
- 800137c: bd80 pop {r7, pc}
- 800137e: bf00 nop
- 8001380: 20000030 .word 0x20000030
- 8001384: 40012400 .word 0x40012400
+ 8000efe: bf00 nop
+ 8000f00: bd80 pop {r7, pc}
+ 8000f02: bf00 nop
+ 8000f04: 20000028 .word 0x20000028
+ 8000f08: 40012400 .word 0x40012400
-08001388 :
+08000f0c :
* @brief CRC Initialization Function
* @param None
* @retval None
*/
static void MX_CRC_Init(void)
{
- 8001388: b580 push {r7, lr}
- 800138a: af00 add r7, sp, #0
+ 8000f0c: b580 push {r7, lr}
+ 8000f0e: af00 add r7, sp, #0
/* USER CODE END CRC_Init 0 */
/* USER CODE BEGIN CRC_Init 1 */
/* USER CODE END CRC_Init 1 */
hcrc.Instance = CRC;
- 800138c: 4b0d ldr r3, [pc, #52] ; (80013c4 )
- 800138e: 4a0e ldr r2, [pc, #56] ; (80013c8 )
- 8001390: 601a str r2, [r3, #0]
+ 8000f10: 4b0d ldr r3, [pc, #52] ; (8000f48