I’d like to use A0-A5 as digital outs. I wrote a small Arduino program to test if I can do this, and it looks like A0-A3 work as hoped but A4 and A5 are funky - A5 is outputting data that I’m not sending it, and setting up A4 affects pulse width of A5. I created a screen capture of what I’m seeing, hopefully it’s helpful. Are A4 and A5 being used in a way that would make this happen, and can it be disabled?
I guess this is an obscure or otherwise challenging issue?
Hi @occamman,
I don’t have an answer for you, but as A4 and A5 are the only two DAC pins, combined with the fact that there is no difference between initializing a pinMode between analog and digital output, have something to do with the issue?
Thanks. Rob.
I might be a little confused. The Swan’s datasheet seems to indicate that A0-A7 can be GPIOs, and that none of these are DACs. The DACs seem to be D10 and D13?
Hi @occamman,
After some digging internally, I have to apologize, as it looks like the pin mapping on our datasheet is incorrect. While we get this fixed, I recommend consulting the Swan support files here: Arduino_Core_STM32/variants/STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY at 0ca1f4ca3d5936cf10855d2cde37e44735425edf · stm32duino/Arduino_Core_STM32 · GitHub that will better show how the Arduino firmware works with the Swan.
Sigh. Thanks. I’ll take a look.
OK, I took I look but I’m not finding those to be helpful - probably my lack of knowledge here. Can you provide something else or point me towards how to use the files you sent?
Thanks,
Al
Hi @occamman,
Sorry about the delay. I’m working on sorting this out - I don’t want to lead you down any new paths until I’ve validated everything first! I’ll be in touch soon.
Rob
Thanks Rob, I appreciate your efforts.
Hi @occamman - Just FYI I’ve got someone on the team investigating this in more detail. Hope to have an update soon!
Thanks. I will be helpful.