Hi Wayne,
Looking at your code - it should be fairly straightforward to convert.... At present you have a custom interrupt for data received on the UART - but can you use a hardware UARTs and just use the RX interrupt - this would save a lot of trouble with undefined registers etc
Getting rid of the custom C code - and using standard flowcode would make portability straightforward.
Some of the C code implements a circular buffer - is this a throwback to using v5 - can you use the circular buffer component here (although there is perhaps no reason to change this - just makes the code a bit clearer and easier to run in simulation)
I would perhaps change the multi-level 'if' in check_received_packet to a 'switch' statement - again for clarity.
What is the program trying to achieve - ie what is the data source transmitting to the UART, what data is transmitted? - it's easier for you to describe than to reverse engineer your code
What is the target ARM processor etc?
Strangely - I'd just suggested this as an example in another thread - the 'mood light' example I submitted does something similar - receives data over UART and actions it when sufficient data received (in this case it was looking for a six byte 'command') - the principle is easy to modify for different command structures (for example a 3 character command). (see
viewtopic.php?f=26&t=20701)
Martin