summary refs log tree commit diff stats
path: root/results/classifier/accel-gemma3:12b/kvm/2540
blob: cc6cd959a52288d76c0037da5dc0306a15ba0254 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Machine B-L475E-IOT01A USART devices not functional
Description of problem:
The B-L475E-IOT01A claims to support STM32L4x5 USARTs, UARTs and LPUART (Serial ports) but does not appear to actually function.

I created a minimal bare metal binary that attempts to write to UART (via printf) but it does not succeed. While debugging it appears that all UART registers for USART1 are zero despite code that is writing to those registers and USART_ISR should have the default value of 0x020000C0 per STM documentation RM0351. The code ends up in an infinite loop waiting for the USART module to become ready but it never does.

For comparison an almost identical program compiled for the netduino-plus-2 (also an STM32 Cortex-M4 CPU) is able to use USART succesfully.
Steps to reproduce:
1. Clone https://github.com/satur9nine/arm-cortex-qemu-demo/tree/STM_b-l475e-iot01a (note branch is STM_b-l475e-iot01a)
2. Obtain arm-none-eabi-gcc version 13.3.rel1 or higher from ARM or linux package manager and install
3. Go to `STM_b-l475e-iot01a_Build` and run `make all` to produce arm-cortex-qemu-demo.bin
4. Run command provided above (optionally run with additional `-gdb tcp::1234,ipv4 -S` options and attach debugger), observe there is no UART output
5. Repeat steps but with `STM_netduino-plus-2_Build` and observe UART output is produced for comparison
Additional information:
Notice memory located at 0x40013800 which is where USART1 is located shows all zeros.

![iot01a_debug](/uploads/ae8eac57e162fe0ae45ec8e09114d038/iot01a_debug.png)