I added the following lines of code:
palSetPadMode(GPIOA, GPIOA_PIN8, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOA, GPIOA_PIN9, PAL_MODE_INPUT);
to let the pins act as input and output, reading from the documentation.
To exclude other problems, do you think that the code i wrote is good, using ...
Search found 3 matches
- Fri Jul 01, 2016 1:41 pm
- Forum: STM32 Support
- Topic: help using ultrasonic ranging module with STM32 nucleoF401RE
- Replies: 7
- Views: 6599
- Fri Jul 01, 2016 9:08 am
- Forum: STM32 Support
- Topic: help using ultrasonic ranging module with STM32 nucleoF401RE
- Replies: 7
- Views: 6599
Re: help using ultrasonic ranging module with STM32 nucleoF401RE
Thank you for the reply.
I have used the osalSysPolledDelayX who call the chSysPolledDelayX function because I have a cortex-m4 but the problem is the first while loop, it never stop, meaning that there are no high level signal back.
while (!palReadPad(GPIOA, GPIOA_PIN9)) ;
This can happen because ...
I have used the osalSysPolledDelayX who call the chSysPolledDelayX function because I have a cortex-m4 but the problem is the first while loop, it never stop, meaning that there are no high level signal back.
while (!palReadPad(GPIOA, GPIOA_PIN9)) ;
This can happen because ...
- Thu Jun 30, 2016 3:32 pm
- Forum: STM32 Support
- Topic: help using ultrasonic ranging module with STM32 nucleoF401RE
- Replies: 7
- Views: 6599
help using ultrasonic ranging module with STM32 nucleoF401RE
Hello I have a problem to run this module, it works like this:
(1) Using IO trigger for at least 10us high level signal,
(2) The Module automatically sends eight 40 kHz and detect whether there is a
pulse signal back.
(3) IF the signal back, through high level , time of high output IO duration is ...
(1) Using IO trigger for at least 10us high level signal,
(2) The Module automatically sends eight 40 kHz and detect whether there is a
pulse signal back.
(3) IF the signal back, through high level , time of high output IO duration is ...