Problems serial communication with frdm-k64f in Simulink

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems serial communication with frdm-k64f in Simulink

863 Views
alberto1_paolin
Contributor I

Good Evening, I experienced problem in simulink about the serial communication for the nxp frdm-k64f. 

Software Description: In Particular I would like to exploit the "Uart0" to make the board and the computer exchange data. So I made two simulink files: the firmware for the board and the debug file. Fist of all the "Hardware model board" is set only in the firmware. I receive the data in the firmware with the block "Serial transmit" of the library "Simulink coder support package for NXP FRDM-K64F Board" which is connected to a "Digital write" which should turn on a LED. This file will be deploied to the board. On the other file I inserted a "Serial send" from the library "Instrument Control Toolbox" and even a "Serial configuration" block to make it work. And I sent a uint8 constant with value "1". This last program will be just run afted the deploy of the other program. I even inserted blocks to send data from the board to the computer.

Behave: I am able to send data from micro to computer without problem with Uart0 using the pin "PTB17", in fact when I run the debug file the green serial communication led on the board ( the one next to the SDA USB) strarts blinking very fast. If I remove the the serial send, and doing so the board will only receive the data from the computer and after the deploy of the firmware, if I run the debug file, I see the green serial send light blinking but no command is passed to the user LED. When in the firmware I enable the blocking mode in the serial receive, when I run the debug file I see the serial communication led is switched on fixed.

Thank you in advance for your attention. 

0 Kudos
0 Replies