Hi Grzegorz
Load the binary application at http://www.utasker.com/kinetis/FRDM-K82F.html to your FRDM-K82F board.
It LPUART connects to the OpenSDA VCOM interface at 115200Baud and supplied a command line menu interface. In its UART menu you can command different Baud rates too.
In the I/O menu there is also a memory debugger interface where you can read internal registers to see how they are setup (or else use a debugger).
Like this you can see how the LPUART is set up for each of the Baud rates.
Main menu
===================
1 Configure LAN interface
2 Configure serial interface
3 Go to I/O menu
4 Go to administration menu
5 Go to overview/statistics menu
6 Go to USB menu
7 Go to I2C menu
8 Go to utFAT disk interface
9 FTP/TELNET commands
a CAN commands
help Display menu specific help
quit Leave command mode
Serial config.
===================
up go to main menu
set_baud Set serial baud rate
set_stop Set stop bits (1/1.5/2)
set_bits Set data bits (7/8)
set_par Set parity (EVEN/ODD/NONE)
set_flow Set flow control (XON/RTS/NONE)
set_high_water Set flow stall (%) [1..99]
set_low_water Set flow restart (%) [1..99]
show_config Show serial configuration
save Save configuration to FLASH
help Display menu specific help
quit Leave command mode
Input/Output menu
===================
up go to main menu
md Memory Display [address] [<l>|<w>|<b>] [num]
mm Memory Modify [address] [<l>|<w>|<b>] [val]
mf Memory Fill [address] [<l>|<w>|<b>] [val] [num]
sd Storage Display {as md}
sm Storage Modify {as mm}
sf Storage Fill {as mf}
se Storage Erase [address] [len-hex]
set_ddr Set port type [1..4] [<i>|<o>
get_ddr Get data direction [1..4]
read_port Read port input [1..4]
write_port Set port output [1..4] [0/1]
lp_cnt Read LPTMR CNT
save Save port setting as default
help Display menu specific help
quit Leave command mode
It is using IRC48MHz as LPUART clock and here are relevant code snippets that may help you:
SIM_SOPT2 = ((SIM_SOPT2 & ~(SIM_SOPT2_LPUARTSRC_MGC)) | (SIM_SOPT2_LPUARTSRC_SEL | SIM_SOPT2_PLLFLLSEL_IRC48M)); // select the 48MHz IRC48MHz clock as source for the LPUART
usDivider = (((48000000/8/115200) + 1)/2);
lpuart_reg->LPUART_BAUD = ((lpuart_reg->LPUART_BAUD & ~LPUART_BAUD_SBR) | (usDivider | LPUART_BAUD_OSR_16)); // set the (new) baud rate
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
Kinetis KL82:
- http://www.utasker.com/kinetis/FRDM-KL82Z.html
- http://www.utasker.com/kinetis/TWR-KL82Z72M.html
For less questions and faster, cheaper developments: try uTasker for Kinetis
