Writing to UART_B of D2000 with Zephyr
MIKHALEV, Vasily <vasily.mikhalev@...>
Dear community,
I am developing for D2000 with Zephyr and I currently need to be able to write to the UART B and to monitor it. However, I cannot manage to do it. For writing to the UAR I am using the function uart_poll_out(). For example.:
#include <zephyr.h> #include <uart.h> #include <device.h>
void main(void) { struct device *dev_b = device_get_binding("UART_1"); uart_poll_out(dev_b, 'b'); }
After flashing the program to D2000, I set the jumpers J9, J10, J11 in the CTS, TXD and N/C positions, open terminal on the virtual serial port, but it seems that there is no signal – nothing happens when I press the “reset” button . With the same settings I am able to monitor UART B of D2000 with QMSI. Also the same code works well for the UART A, e.g.:
void main(void) { struct device *dev_a = device_get_binding("UART_0"); uart_poll_out(dev_a, 'a'); }
Did anyone have the similar issues and was able to solve them? I would really appreciate your help.
Best regards, Vasily
|
|
Felipe Neves
Hi Vasily! How are you doing? some points that can help you:2017-01-31 7:56 GMT-02:00 MIKHALEV, Vasily <vasily.mikhalev@...>:
--
Felipe S. Neves Embedded software & systems engineer Skype: fneves1989 +55 11 96610 – 0855
|
|
MIKHALEV, Vasily <vasily.mikhalev@...>
Hi Felipe,
I am doing good. How are you?
Thank you very much for your help!
Did you check the pointer received to you dev_b variable after a call of device binding? is it null?
I’ve just checked it. Not it’s not null.
- Check the platform pin-mux to see if uart pins that goes to your pc match with the uart that you're trying to use; - Also, in pinmux check if these pins are set to behave as uart function before you use/configure the uart;
Both seem to be correct. When I have a QMSI 1.1 project instead of Zephyr 1.4, I am able to see the messages on the UART B with exactly the same settings.
- did you configured the uart connection parameteres? eg.: baud rate, start/stop bit? I am using the following configurations:
CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=n CONFIG_UART_QMSI_0=y CONFIG_UART_QMSI_0_HW_FC=n CONFIG_UART_QMSI_0_BAUDRATE=57600
#CONFIG_UART_QMSI_1=y #CONFIG_UART_QMSI_1_HW_FC=n #CONFIG_UART_QMSI_1_BAUDRATE=57600
Best, Vasily
From: Felipe Neves [mailto:ryukokki.felipe@...]
Sent: mardi 31 janvier 2017 11:07 To: MIKHALEV, Vasily <vasily.mikhalev@...> Cc: zephyr-users@... Subject: Re: [Zephyr-users] Writing to UART_B of D2000 with Zephyr
Hi Vasily! How are you doing? some points that can help you: - Did you check the pointer received to you dev_b variable after a call of device binding? is it null? - Check the platform pin-mux to see if uart pins that goes to your pc match with the uart that you're trying to use; - Also, in pinmux check if these pins are set to behave as uart function before you use/configure the uart; - did you configured the uart connection parameteres? eg.: baud rate, start/stop bit? Feel free to ask any questions, I will be happy to help you :) Best, Felipe
2017-01-31 7:56 GMT-02:00 MIKHALEV, Vasily <vasily.mikhalev@...>:
Felipe S. Neves Embedded software & systems engineer Skype: fneves1989 +55 11 96610 – 0855
|
|