ISELED read command issue

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

ISELED read command issue

958 Views
shudii
Contributor I

Hi, 

I'm developping a embient light application using ISELED for automotive.

Now, I surface on a big problem.

1. my develop environment

 FS32K144UIT0VLHR

SDK : S32SDK_S32K1XX_RTM_4.0.2

IDE & compiler : IAR 8.50.9

using 35 ISELEDs and timer's timeout value for ISELED is 10ms.

Coreclock : 40MHz

ISELED setting by Design studio

shudii_0-1654756704111.pngshudii_1-1654756717880.pngshudii_2-1654756730753.png

timing_pal_1 channel 0 is used for ISELED timeout. Another is for my application.

2. issue 1

digLED_Read_Diagnostic, digLED_Read_Temp commands are sometimes occur timeout from DMA callback.

Actually, Tx, Rx total time is not over 3ms for 35 leds.

show  below pictures.

Left is a normal, right is abnormal data, buffer[2]'s data should be 0x21's LED data.

So, as right case, I lost a one led data.

This situation is more happend when my CAN driver is working.

If I not use a CAN, then that is reduced.

(my CAN stack is generated by VECTOR GENy tools)

shudii_0-1654754759681.png

shudii_1-1654755242874.png  <---- It's 35 led data. but In my buffer, just 34 data.

I want's know a detail reason and solutions........

 

3. issue 2.

When return value of ISELED library API's is DIGLED_BUSY, then ISELED library is not working any api functions(like a digLED_Reset(), digLED_Init_Strip()....).

After DIGLED_BUSY, always return DIGLED_BUSY. and ISELED pins have a no data.

And then, data pin is LOW. but data & clock pin is HIGH at normal situation.

So, like a this situations, how to reset or clear the ISELED library. I mean library's inside, not ISELED chip.

 

thanks.

 

Tags (1)
0 Kudos
3 Replies

851 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

The point is, there are only two possible cases: either the data from LEDs can be read before timeout, or the timeout occurred. If the digLED_BUSY couldn't be out although the transmission was finished, then probably the interrupt weren't installed correctly, or the application reached a state where there were some blocking that prevent these ISRs to be executed. In that case, there is no other option but to reset the MCU, since the root cause wasn't from the ISELED itself.

Best Regards,

Nam

0 Kudos

862 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

1. The ISELED driver uses LPSPI and/or FlexIO, DMA and LPIT interrupts. These interrupts might work incorrectly if they are preempted by other interrupts. Try to disable other interrupts before starting an ISELED transmission.

2. During runtime, an ISELED transmission should return its status before starting a new one, via either LPSPI and/or FlexIO and DMA interrupts (transmission/reception completed) or LPIT interrupt (timeout occur). At least one of these interrupts should be executed, otherwise the status will be always DIGLED_BUSY.

Best Regards,

Nam

0 Kudos

856 Views
shudii
Contributor I

Thanks your reply.

your answer 1 is Ok.

But, about answer 2......

I mean, If It's once a happened, I can't re-initialize the ISELED library. The one way is just MCU reset.

Acording your answer... There is no way to re-linitilize the ISELED library. Right?

please look a gain.

I want to know the re-initialization ISELED except MCU reset, even if the reson is a bug.

As an example, deinitialize the DMA and FLEXIO, and call digLED_Init_Interface().

Is there no way?

0 Kudos