Issues while running ISELED parallel commands

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

Issues while running ISELED parallel commands

1,846 Views
SorinT
Contributor I

Hello, I'm using the ISELED driver version 4.8.0 and I'm having some issues with the parallel commands.

I have defined a buffer pool in the application for parallel commands. Whenever I need to send a set of commands, I reserve a piece of this whole buffer, configure it with my commands and send it to the iseled driver. When the driver sends back the transmission complete signal, I free the buffer so that I can use it later. I use it only with SET_DIM_BLOCK & SET_RGB_BLOCK commands. All works fine most of the time but it seems that sometimes the ISELED driver writes back in these buffers, also after it calls the application callback. This compromises my buffers and makes the entire handling stuck at some point. Does the ISELED driver write back anything in the buffers that I pass as argument to the digLED_Send_Cmd_Parallel API?

SorinT_1-1626267138097.png

All this data from above is written from inside the iseled library.

Labels (1)
Tags (1)
0 Kudos
Reply
3 Replies

1,806 Views
dragosrachitan
NXP Employee
NXP Employee

Hello,

The data buffer is also used for ISELED encoding and frames composition. This is done to minimize memory consumption. It is recommended to repopulate the buffer before each parallel command. Please let me know if you encounter any other problems.

Best regards,

Dragos Rachitan

0 Kudos
Reply

1,749 Views
SorinT
Contributor I

Hi,

Is there any example/documentation on how to use the parallel mode for SET_DIM_BLOCK commands and SET_RGB_BLOCK commands? I am still having some issues with it that after I get the TRANSMISSION_COMPLETE signal for a digLED_Send_Cmd_Parallel(), the following digLED_Set_RGB() requests fail to execute for some reason.

Here is a screenshot with the parallel command that I'm sending:

SorinT_0-1628496754742.png

For all 18 LEDs (starting with address 2) I want to set:

  • Dim 3 for Red channel, Dim 0 for Blue & Green channels
  • RGB(0xCC, 0x00, 0x00), every other 3 LEDs. RGB(0x00, 0x00, 0x00) in between.

Is there anything wrong that I'm doing? The command seems to execute ok, but after the TRANSMISSION_COMPLETE signal, a digLED_Set_RGB(0,0,0,0,0) command to turn everything OFF doesn't do anything (event though it responds with DIGLED_OK).

 

Thank you!

0 Kudos
Reply

1,712 Views
SorinT
Contributor I

Hello, I have some additional questions:

  • for parallel & block commands, when is the TRANSMISSION_COMPLETE sent to the application (via callback)? Is it after the first command from the parallel/block buffer is successfully sent to the ISELEDs or after the last command is sent?
  • Is is safe to overwrite the buffers for parallel & block commands after the TRANSMISSION_COMPLETE signal is received?
  • What happens if some of the commands from the buffer are successfully sent and some aren't (timeouts, bus errors)?
  • What happens if some of the commands are invalid (led address, format, etc)?
  • Is there any restriction in using the parallel & block commands together with the regular single commands?
  • In case of an error, is there any possibility that the application callback is called multiple times (e.g. once for reporting a timeout and again for reporting the TRANSMISSION_COMPLETE / RECEPTION_COMPLETE)?
  • Is is guaranteed that for a request the callback is only called once for downstream cmds (Tx complete) or twice for upstream cmds (Tx complete, Rx complete)?
  • After the application callback is called by iseled driver, is it needed to wait for an additional delay before sending the next command or it can be sent right away?

Thank you!

Regards,

Sorin

0 Kudos
Reply