SendBlock funtion doesn´t send correct data

cancel
Showing results for 
Search instead for 
Did you mean: 

SendBlock funtion doesn´t send correct data

358 Views
Contributor II

Hi,

I´m new with freescale microcontrollers and I am testing a board with MK20DX256VLH7 microcontroller. I have startedwith a Project developed with the Processor Expert tool. In order to develop the application I have followed step by step "the Processor Expert Software – Microcontrollers Driver Suite Getting Started Guide" tutorial. Then when I had to test debugging I saw that the LED was flashing well with the correct frequency, but I checked that the message sent to Tera Term Application by UART wasn't correct. Tera Term has received something but there are some strange characters. The string that I send is "Hello World". The direction where is stored the string is 0xfc0 allways, although I change the string, and I saw that all characters are stored in them.

strange_characters.png

The configuration is the same in Tera and in AS1 component, the baud rate is 9600, no parity, stop bit, 8 bits, and no control flow. 

Tera Term Configuration.png

UART_Component_Configuration.png

When I execute step by step inside the "AS1_SendBlock" function, I can see how the characters are saved. For example the character that I can see in *DeviceDataPrv->OutDataPtr is 0x48h, that is the hexadecimal character of first letter "H". Then later it is executed the next line:

UART_PDD_EnableInterrupt(UART2_BASE_PTR, UART_PDD_INTERRUPT_TRANSMITTER);

Here I think it´s the sending order. Why don´t send the string correctly? There are something in the configuration? The configuration should be different with MK20DX256VLH7? The baud rate is ok?

In my application “AS1_SendBlock” function  is executed step by step like it should be, but when I want to see where the data are sent (in which output registers) when the transmission interrupt is enable, I don’t know where because they are unknown for me. Do you Know the registers in which appears the UART output transmission data or the UART output buffer for mK20dx256vlh7 microcontroller?? I´m reading in the datasheet and I don´t find any registers related on them. I want to see if the transmission data in these registers are the same that I want to transmit and also in order to compare with data that arrive to Tera application.

I would be very grateful for your help,

Arturo Arteaga

0 Kudos
2 Replies

2 Views
NXP TechSupport
NXP TechSupport

Hello Arturo,

I checked your same case on this thread  , please refer to there .

https://community.nxp.com/message/890237 

BR

Alice

0 Kudos

2 Views
Contributor II

Hello Alice,

Finally yestarday I managed to send some chars. Moreover I managed to received “chars” from the PC to microcontroller, and back to re-send from the microcontroller to PC like I was doing “an echo”. I had to use another component different, I’ve used “Asynchro Serial” component. It works fine capturing characters from the PC and re-sending to microcontroller, but also I want to send blocks of characters like words not only individual characters. I saw SendBlocks doesn´t exists in “Asynchro Serial” component, like Serial_LDD but I have problems to receive with Serial_LDD. Do you know a method to send characters´s block in component “Asynchro Serial” like “Serial_LDD” component?

In the meantime I’ll check your proposal to find some new ideas for my new issue.

Thanks a lot for your effort.

Have a nice day!

Arturo Arteaga

De: Alice_Yang

Enviado el: viernes, 24 de marzo de 2017 5:06

Para: Arturo Arteaga

Asunto: Re: - Re: SendBlock funtion doesn´t send correct data

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg> NXP Community

Re: SendBlock funtion doesn´t send correct data

reply from Alice_Yang <https://community.nxp.com/people/Alice_Yang?et=watches.email.thread> in Kinetis Microcontrollers - View the full discussion <https://community.nxp.com/message/890239?commentID=890239&et=watches.email.thread#comment-890239>

0 Kudos