[stm32] Update stm32 boards#2784
Conversation
|
I confirmed these changes worked on the WeAct STM32F401CCU6, however I a fault consistently occurred if I rapidly trigger the interrupt multiple times in a row (by pulling the selected pin high). This may not be due to your changes and something more related to Tock 2.0 (or 1.0 haha). If it would be better for me to bring this up elsewhere (it's own issue?), just let me know. The serial debug output is included below: |
|
It seems that you have a stack overflow fault. My first guess it that it might be dut to the
|
|
A stack overflow can happen if yield is called in a callback in a loop and the stack frames never get a chance to be popped off the stack. |
hudson-ayers
left a comment
There was a problem hiding this comment.
A couple small comments, but this mostly looks good.
I think its a little weird seeing the changes to the touch capsules grouped in here with the other changes, but I realize only STM boards currently use those capsules so I'm not too worried about it.
I found the issues while testing the touch panel. I can split them out in two PRs if necessary. |
lschuermann
left a comment
There was a problem hiding this comment.
Looks good in general.
I agree with Hudson it's weird that this contains changes to the ft6x06 device driver (and a pretty large changeset at that). A separate PR with a description of what precisely has been the issue here would've been great.
I agree, I'll split it and send new PRs |
b6f4d4e
51535d0 to
b6f4d4e
Compare
|
It looks like this PR still includes the changes to touch/ft6x06? |
b6f4d4e to
f55e2b7
Compare
I'm sorry, fixed it :) |
| #[no_mangle] | ||
| #[link_section = ".stack_buffer"] | ||
| pub static mut STACK_MEMORY: [u8; 0x1000] = [0; 0x1000]; | ||
| pub static mut STACK_MEMORY: [u8; 0x1400] = [0; 0x1400]; |
There was a problem hiding this comment.
Hmm, it seems the stm32 boards may still need some more stack optimization:
make stack-analysis
stm32f3discovery
----------------------
main stack frame:
696 main
5 largest stack frames:
4024 _ZN16stm32f3discovery15get_peripherals17h48eb20f8d2a6a9f6E
2120 rust_begin_unwind
704 _ZN8capsules15process_console23ProcessConsole$LT$C$GT$11write_state17h724a1bf796a6ceffE
696 main
624 _ZN104_$LT$capsules..process_console..ProcessConsole$LT$C$GT$$u20$as$u20$kernel..hil..uart..TransmitClient$GT$18transmitted_buffer17hffe88b7f7ca20846E
|
bors r+ |
2784: [stm32] Update stm32 boards r=bradjc a=alexandruradovici ### Pull Request Overview This pull request updates the stm32 boards: - adds the process console - simplifies setting pin interrupts - fixes the adc to return 16 bit values This pull request adds a helper function to make enabling interrupts for gpio easier. The stm32 MCU does not provide a separate interrupt line for all the gpio pins. This makes enabling interrupts a little more difficult and requires some extra code in the board file. I am not the original author of the code for these boards, so I am not sure why this has been designed the way it is now. This also enables interrupts for the first gpio exposed pin, allowing the gpio test to succeed. ### Testing Strategy This pull request was tested using a nucleo F429ZI and an STM32F4g Discovery board ### TODO or Help Wanted N/A ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Alexandru Radovici <msg4alex@gmail.com>
Pull Request Overview
This pull request updates the stm32 boards:
This pull request adds a helper function to make enabling interrupts for gpio easier. The stm32 MCU does not provide a separate interrupt line for all the gpio pins. This makes enabling interrupts a little more difficult and requires some extra code in the board file.
I am not the original author of the code for these boards, so I am not sure why this has been designed the way it is now.
This also enables interrupts for the first gpio exposed pin, allowing the gpio test to succeed.
Testing Strategy
This pull request was tested using a nucleo F429ZI and an STM32F4g Discovery board
TODO or Help Wanted
N/A
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.