Generate code of AS1_SendBlock not working

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

Generate code of AS1_SendBlock not working

跳至解决方案
2,150 次查看
lander
Contributor IV

I am unable to enable the SendBlock or RecvBlock method of the AsynchroSerial component of PE. I have SendChar and RecvChar enabled and working fine but I started looking into sending words and sentences and I am unable to click "don't generate code" to choose "generate code" for Send/RecvBlock under the Component Inspector tab. Is there a reason for this?

Thank you,

Lander

标签 (1)
1 解答
1,136 次查看
jch
NXP Employee
NXP Employee

Hi,

for using the Block methods (Send/Receive block), it is necessary to specify the length of the Output/Input buffer as it is mentioned in the hint of the e.g.: SendBlock method: "This method is available only if non-zero length of the output buffer is defined and the transmitter property is enabled." To use this method you have to enable the interrupts and then inside the  Output buffer size property specify Output buffer size in bytes > 0. And from now the SendBlock method will be available for your usage. Please see the picture. The same is for the RecvBlock with the property Input buffer size.AS_EnableBuffer.bmp

在原帖中查看解决方案

4 回复数
1,137 次查看
jch
NXP Employee
NXP Employee

Hi,

for using the Block methods (Send/Receive block), it is necessary to specify the length of the Output/Input buffer as it is mentioned in the hint of the e.g.: SendBlock method: "This method is available only if non-zero length of the output buffer is defined and the transmitter property is enabled." To use this method you have to enable the interrupts and then inside the  Output buffer size property specify Output buffer size in bytes > 0. And from now the SendBlock method will be available for your usage. Please see the picture. The same is for the RecvBlock with the property Input buffer size.AS_EnableBuffer.bmp

1,137 次查看
lander
Contributor IV

That did it, thank you!!

0 项奖励
回复
1,137 次查看
BlackNight
NXP Employee
NXP Employee

Are you using the AsynchroSerial with an interface from another component? Then that interface could have disabled the block methods? Is the method grayed out?

It would be good if you could share some more information (screenshot, which tool chain/version, which microcontroller) to narrow the problem.

0 项奖励
回复
1,137 次查看
lander
Contributor IV

I'm using the K20 with 72MHz, CW v10.3 and yes SendBlock is grayed out and no arrow pops up to the right of the block to switch from "don't generate code" to "generate code". Actually, every method that is grayed out with this component, I can't switch from "don't generate code" to "generate code". I just took screen shots to shot the gray out, along with the other components grayed out that won't switch and the properties of the component. Not sure if any will be of much help.

Thank you!

0 项奖励
回复