Generate code of AS1_SendBlock not working

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Generate code of AS1_SendBlock not working

ソリューションへジャンプ
2,347件の閲覧回数
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,333件の閲覧回数
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,334件の閲覧回数
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,334件の閲覧回数
lander
Contributor IV

That did it, thank you!!

0 件の賞賛
返信
1,334件の閲覧回数
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,334件の閲覧回数
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 件の賞賛
返信