According to the LoRa-E5 datasheet V1.0 on pg 6/18, there are several pins labeled as “MCU GPIO” which implies that these are the actual pins from the ARM uC. According to the STM32WLE5JC datasheet (ST DS1305 rev 4, ppg 48-52), several pins (up to 14) can be configured as inputs to the ADC.
The table in LoRa-E5 datasheet V1.0 on pg 8/18 the LoRa-E5 datsheet table contains: “ADC 1 ADC Input, include 1pins,12-bit 1Msps” which implies only one input can be used.
Which of these is correct and if there really only is 1 ADC pin available… Which one is it?
Ok. So please verify my own answer to my original question.
Based on “LoRa-E5 datasheet v1.0”, PB13(24) and PB14(26) are pinned-out from the silicon. I should be able to configure PB13 as ADC_IN0 and PB14 as ADC_IN1.
I have erased the part and do NOT wish to use the Seeed “AT command” firmware and do not care that PB13 was used as a bootloader request by the AT firmware.
Can you please verify? I have a PCB ready for manufacture and need to know this before proceeding.
Thanks.
Thanks, Citric. I think I’ve answered my own question by reading some voltage from pins pb13 and pb14 by modifying the Lora-e5-end-node example with success. Thanks for passing this on as well!
Hi. Both actually. The .ioc drives which initialization and instance management functions get generated, though I had to play with it a bit to get the proper initialization modes ie, interrupts, dma etc., for my application. I used ADC 1&2 as the COMP 1&2 “-“ pins are shared with ADC 1&2 which allows my app to use a comparator to wake from sleep mode, then use the adc to measure the input. The Seeeq data sheet is not great but basically any pins from the st arm that are pinned out to the seeeq package can be used however you like, using whatever functionality you programmatically select or change via the .ioc.
hi @wdawson61 I hope you are doing well.
Can you share the piece of code where you edit the file to use the ADC?
I want to use PB3 & PB4 for ADC_CHANNEL_2 & ADC_CHANNEL_3 respectively. Till now, I am unable to get the right value.
Below is the code I have added in the function uint16_t SYS_GetBatteryLevel(void) in the adc_if.c file.
I’m getting 0 for both channels, I have connected a voltage divider circuit to check the voltage levels, but I’m always getting 0.
Any help would be appreciated. I have not changed the .ioc file yet.
Regards