Lora-net / lora_edge_tracker_ref_design

Demonstration application for LoRa Edge tracker reference design - compatible with LoRa Basics Modem-E
Other
17 stars 14 forks source link

32Khz crystal not working? #8

Closed Lozeonjyu closed 3 years ago

Lozeonjyu commented 3 years ago

Hi,

I compile the code under lora_edge_tracker_ref_design/smtc_tracker_app/MDK-ARM/ and program the hex file to the MCU but there is nothing running. When I probe the 32kHz crystal I realize it is not resonating, just high on one end and low on the other end. I checked the RCC config functions and they look good to me. Am I missing something here?

Thanks a lot

smtcbboulet commented 3 years ago

Hello,

have you compiled the tracker application ? have you flashed the bootloader, if the bootloader is not flashed, nothing works, but if you have an .hex file it means that you compile the app with the bootloader, if it's the bin file, it doesn't contain the bootloader. I can ensure you that 32KHz works. when you bought the board, it supposed to be flashed with the 1.2.0 app tracker and functional, was it the case ?

regards,

Benjamin

Lozeonjyu commented 3 years ago

Hello,

have you compiled the tracker application ? have you flashed the bootloader, if the bootloader is not flashed, nothing works, but if you have an .hex file it means that you compile the app with the bootloader, if it's the bin file, it doesn't contain the bootloader. I can ensure you that 32KHz works. when you bought the board, it supposed to be flashed with the 1.2.0 app tracker and functional, was it the case ?

regards,

Benjamin

Yes I loaded the hex file. In fact I tried 3 combinations:

  1. compile the code under lora_edge_tracker_ref_design/smtc_tracker_app/MDK-ARM/ and program the hex file
  2. compile the code under lora_edge_tracker_ref_design/smtc_tracker_app/MDK-ARM/ and lora_edge_tracker_ref_design-master\smtc_tracker_bootloader_ota\MDK-ARM, and program both hex files
  3. load the 2 bin files under lora_edge_tracker_ref_design-master\bin

But none of these options work

Yes the hardware is preloaded but I just would like to check if I can make changes. My company is trying to see if we need LR1110 or not.

Thanks

smtcbboulet commented 3 years ago

Okay,

Yes can make changes with this code, several questions : 1 : if you flash the provided hex, does it works ? for information the .hex (lr1110_modem_loramac_EU868.hex) contains the bootloader and the application, you need to flash only one hex in this case. 2 : do you compile with GCC or Keil ? Keil I guess from what I see 3 : if you flash the bin you have to flash them to the right addresses (I will add this point into the readme) the bootloader @ 0x8000000 and the application @ 0x8007000. 4 : if you flash only the bootloader, do you see the activity ? it should start in BLE OTA mode 5 : do you have traces ?

regards,

Ben

Lozeonjyu commented 3 years ago

I wrote a simple LED toggle program and realized the crystal is actually running, as the toggle delay time I set is correct. But still not sure why I can't probe it... I will leave this for now.

I enable the trace and found out that the init never success:

INFO : ###### ===== LR1110 Modem ClassA demo application ==== ###### ERROR: ###### ===== LR1110 BOARD INIT FAIL ==== ###### INFO : ###### ===== LR1110 MODEM VERSION ==== ###### LORAWAN : 0000 FIRMWARE : 00 BOOTLOADER : 00 REGION : US915 ERROR: ###### ===== LORAWAN INIT ERROR ==== ###### INFO : ###### ===== LR1110 MODEM INIT ==== ###### DevEui : 00-00-00-00-00-00-00-00 AppEui : 00-00-00-00-00-00-00-00 AppKey : Semtech join server used Pin : 00000000 ERROR: ###### ===== JOINING CMD ERROR ==== ##### INFO : ###### ===== WATCHDOG RESET ==== ###### INFO : ###### ===== LR1110 Modem ClassA demo application ==== ###### ERROR: ###### ===== LR1110 BOARD INIT FAIL ==== ###### INFO : ###### ===== LR1110 MODEM VERSION ==== ######

I probe the 4 SPI pins they all have signals, but have not checked if the message is right or not yet.

As for your questions: I checked lr1110_modem_loramac_US915.hex, same error as above.

  1. I compile with Keil
  2. Yes addresses are confirmed
  3. I have not tried it yet
  4. Yes I have trace and is shown above.
smtcbboulet commented 3 years ago

Hello, sorry for the delay, definitely here the LR1110 is not in modem this is why you have an error. you can update your LR1110 with lr1110_modem_tracker_update_trx_to_modem.hex in hex_merged forlder

Benjamin