Howto understand queue size in charq.h

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Howto understand queue size in charq.h

跳至解决方案
1,354 次查看
Fabi
Contributor III

During troubleshooting of my application using interrupt based :ittya I've just arrived charq.h

At line 161 is a fixed array for data members:

char      QUEUE[4];

 

On the other hand, I've configured

BSPCFG_SCI0_QUEUE_SIZE              64

 

Does this work? I haven't found any relation between _CHARQ_FULL and size 4. Should I increase the size of the array?

标记 (2)
0 项奖励
回复
1 解答
1,150 次查看
PetrM
Senior Contributor I

Hello,

 

BSPCFG_SCI0_QUEUE_SIZE works. Don't make changes to the structure. It it assumed, that the structure is located at the beginning of some memory pool and everything that follows is the QUEUE itself.

 

Regards,

PetrM

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,151 次查看
PetrM
Senior Contributor I

Hello,

 

BSPCFG_SCI0_QUEUE_SIZE works. Don't make changes to the structure. It it assumed, that the structure is located at the beginning of some memory pool and everything that follows is the QUEUE itself.

 

Regards,

PetrM

0 项奖励
回复
1,150 次查看
Fabi
Contributor III

Thanks PetrM for explanation. I'm currently improving serl_int.c to reduce interrupt load. I want to use HW FIFO from MK60 which is 8 byte because I've high RX load (460 KBaud) in my application.

In relation with this development I need to inspect the charq content during debug. To see the full array content (64 byte) instead of 4 bytes only, I've adapted the queue size from 4 to 64 byte.

I promise to revert it to 4 bytes in the release version of my application :smileywink:

0 项奖励
回复