And, here's step by step instructions:
First thing to note is that Launchpad's UART-via-USB emulation is extremely fragile. It seems that if MCU started to produce UART output but host doesn't read it out, then buffer in USB bridge just gets overflowed and it stops responding to USB. So, if you want to get it working, follow each step below precisely and if any issue happens, restart from beginning (with unplugging LaunchPad).
- If you have plugged LaunchPad into USB, unplug it now to make sure you start with properly reset device.
- Plugin the board into USB, general-purpose green and red should blink interchangeably. The demo app doesn't yet sense temperature or sends it out yet in this mode.
- Execute stty 2400 -F /dev/ttyACM0 . That's right - the demo app communicates at 2400 bit/s data rate and using any other rate will produce garbage input. (One reason for such low speed is that LaunchPad's MCU actually doesn't have hardware UART, it is emulated in software).
- Run hexdump -v -C /dev/ttyACM0 . It shouldn't produce any output yet.
- Press GPIO button. The demo app goes into measurement mode and starts to send out temperature in Fahrenheit as raw bytes over UART. Try to heat/cool air around the board to see values change.
00000020 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 |````````````````| 00000030 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 60 |````````````````| 00000040 60 60 60 60 60 60 60 60 60 60 61 60 60 61 60 60 |``````````a``a``| 00000050 61 60 60 61 61 61 60 61 61 61 61 61 61 61 61 61 |a``aaa`aaaaaaaaa| 00000060 61 61 61 61 61 62 61 62 62 62 62 62 62 62 62 61 |aaaaababbbbbbbba| 00000070 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 |bbbbbbbbbbbbbbbb| 00000080 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 |bbbbbbbbbbbbbbbb|
No comments:
Post a Comment