Modem Buffer causing issues/clearing

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

Modem Buffer causing issues/clearing

339 Views
burgeh
Contributor IV

I am trying to use the Nimbelink CATM1 Skywire modem which uses sequans, with the MK22FN256LH12, however I having a great deal of issues with the generated code from processor expert. I am basically always able to send my packet once, but when I loop back around the pointer to the new rx data is where it left off which makes sense but I want to clear that. I tried Modem_ClearRxBuf(); but this seems poorly written, and just sets a constant to the number of characters in the buffer to 0. The buffer still has junk in it I do not want. Also when I POST data to the modem, if I do not try and read the buffer it just doesn't work. I'm clueless as to why I would need to read my RX buffer.

Any suggestions appreciated

0 Kudos
1 Reply

251 Views
mjbcswitzerland
Specialist V

Christopher

If you don't find a solution with PE generated code consider the uTasker project (it is available as open source or supported professional for almost all Kinetis parts) and has a long history of usage in industrial projects using modems and various serial communications. It has bullet-proof UART interfaces for such work with DMA on tx and rx where needed and is compatible across all UART/LPUARTs in the range so can be moved between Kinetis processor without needing to rework code. In addition it fully simulates the Kinetis (and its UART, interrupts, DMA in approx. real time) so allows you to do all development with a physical modem connected to the PC via RS232 and write/test/debug the Kinetis code there which tends to reduce project development costs dramatically.


Regards

Mark


Kinetis: http://www.utasker.com/kinetis.html
Kinetis K22:
- http://www.utasker.com/kinetis/FRDM-K22F.html
- http://www.utasker.com/kinetis/TWR-K22F120M.html
- http://www.utasker.com/kinetis/BLAZE_K22.html
- http://www.utasker.com/kinetis/tinyK22.html
UART - http://www.utasker.com/docs/uTasker/uTaskerUART.PDF
MODBUS - http://www.utasker.com/docs/MODBUS/uTasker_MODBUS.PDF


Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M

For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : http://www.utasker.com/support.html

0 Kudos