First Port Test App on STM32F103VE
Posted: Wed Jan 18, 2012 3:59 am
I have successfully ported 2.2.7 on two variants of a PiXCL STM32F103VE board. It was easier than I expected once the HAL/PAL concept and implementation was understood.
LEDs flash and test data is output to USART1 in both cases. I think I have a button set up correctly (palReadPad(IOPORT2, GPIOB_BUTTON)) in my board.h.
In main.c, the button is tested and if true calls TestThread which outputs the test data.
I need some clarification.
It seems to me that test data should be started only when the button is pressed. Since the test data output starts immediately, does this mean my button setup is incorrect?
A second question is how to send data (e.g. the chip serial number) to the USART. I see how TestData does it (as a device driver thread if I understand it correctly). printf just hangs, as I expected. In the forum I see references to "chprintf" and "newlibrary", but can't locate a source file. I've experimented with the shell commands. I'll look at adding another test section to display the serial number.
Suggestions?
LEDs flash and test data is output to USART1 in both cases. I think I have a button set up correctly (palReadPad(IOPORT2, GPIOB_BUTTON)) in my board.h.
In main.c, the button is tested and if true calls TestThread which outputs the test data.
I need some clarification.
It seems to me that test data should be started only when the button is pressed. Since the test data output starts immediately, does this mean my button setup is incorrect?
A second question is how to send data (e.g. the chip serial number) to the USART. I see how TestData does it (as a device driver thread if I understand it correctly). printf just hangs, as I expected. In the forum I see references to "chprintf" and "newlibrary", but can't locate a source file. I've experimented with the shell commands. I'll look at adding another test section to display the serial number.
Suggestions?