I've now confirmed that I have the correct baud on the receiving side (115200).

But there's a comment that says "pin 9-10" and that is NOT where my pins are going.

I started digging into the datasheet for the microcontroller to see what's up and pins 8 and 9 can be configured as UART2 (19-20, the ones I am actually connected to, are UART1). But at best pin 10 is USART2_CK.

The hunt continues

Reply to this note

Please Login to reply.

Discussion

I see references in the comments to AF7 and the code isnsetting af_num to 7, which seems to match. This lines up with pins 19/20 being UART1.

Ohhhh, PA9 and PA10, not literally pins 9 and 10! I think it's starting to come together. Can you feel the excitement?

But why does the comment say USART2 init if it is really initializing UART1? Is it a comment that is wrong? A typo? Maybe they used to use UART2 and then switched to UART1 and just missed updating the comment?

The variable is named usart1, so it feels like a deceptive comment, but what does the code say? Will I be able to confirm it before it's time for the 2600 meeting? We'll see...

It looks like I might be at the end of the line.

The MCU datasheet specifies the memory mapping for the PORT A range, but not any information on the structures that go there.

There's not even a reference to some other document that defines those structs.

Looks like hackaday is going to help me out. https://hackaday.com/2020/12/23/bare-metal-stm32-exploring-memory-mapped-i-o-and-linker-scripts/

Maya Posch, if you are on Nostr, I want to follow you and give you a zap for writing this article!!!