Need an overview on using itty MQX devices

cancel
Showing results for 
Search instead for 
Did you mean: 

Need an overview on using itty MQX devices

399 Views
OliverSedlacek
Contributor III

I'm working on some custom hardware that uses MQX 4 as the RTOS. The command line interface is through a UART and the code currently polls the MQX tty device for received characters. At speed I'm losing characters, and I really want to use interrupts, but reading the reference manual isn't clarifying matters. Can anyone provide a quick crib on what I need to do?

0 Kudos
5 Replies

187 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Oliver:

If you want to use interrupt mode, I would suggest you try to modify  BSP_DEFAULT_IO_CHANNEL in user_config.h.

For example, for frdm-k64 board,

original:

#define BSPCFG_ENABLE_TTYA       1
#define BSPCFG_ENABLE_ITTYA      0

new:

#define BSPCFG_ENABLE_TTYA       0  
#define BSPCFG_ENABLE_ITTYA      1

#define BSP_DEFAULT_IO_CHANNEL     "ittya:"

Then recompile all libraries.

Regards

Daniel

0 Kudos

187 Views
OliverSedlacek
Contributor III

All I see is tumbleweed blowing across abandoned fora! Is MQX now a zombie RTOS?

0 Kudos

187 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Oliver:

I did a little digging , there is a queue size setup in frdmk64f.h. BSPCFG_SCI0_SIZE, the default is set to 64. If you increase this size to a bigger value, that might solve your issue.

For MQX RTOS, the feature for MQX classic 4.x is set frozen.   MQX v5 is a continuation of MQX. Please check below link for more details. 

MQX™ v5 Software Solutions|NXP 

Regardsk

Daniel

0 Kudos

187 Views
OliverSedlacek
Contributor III

Sorry for the slow response, I was having trouble logging in. I was pointed at an old MQX 3.8 example, and after porting the API calls to MQX 4 I got that working. The basic point was that I need to fopen the port and then fread from it. I am finding it very brittle though, with apparently unrelated code changes altering the success of the fopen call. I may investigate further if time permits as I don't like unpredictable side effects.

0 Kudos

187 Views
OliverSedlacek
Contributor III

That was pretty much the first thing I did, but it makes absolutely no difference. There must be something else I need to do!

0 Kudos