Generate code of AS1_SendBlock not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate code of AS1_SendBlock not working

Jump to solution
2,004 Views
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

Labels (1)
1 Solution
990 Views
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

View solution in original post

4 Replies
991 Views
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

991 Views
lander
Contributor IV

That did it, thank you!!

0 Kudos
991 Views
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 Kudos
991 Views
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 Kudos