Re: Writing to UART_B of D2000 with Zephyr


Felipe Neves
 

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@...>:

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

 


_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users




--
Felipe S. Neves 
Embedded software & systems engineer
Skype: fneves1989
+55 11 96610 – 0855 

Join users@lists.zephyrproject.org to automatically receive all group messages.