NXP S32K118Q048 Red LED blinking Problem

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

NXP S32K118Q048 Red LED blinking Problem

ソリューションへジャンプ
704件の閲覧回数
yousefdessouki123
Contributor II

am currently working with the S32K118Q048 Evaluation Board (EVB). I have successfully configured and toggled the blue LED on the board using the standard driver interface. However, I am encountering issues when attempting to control the red and green LEDs.

The red LED is connected to pin PTD16, and the green LED is connected to PTD15. According to the standard driver configuration, the corresponding channel addresses should be:

  • Red LED (PTD16): 0x0070

  • Green LED (PTD15): 0x006F

Despite configuring these channel addresses correctly, neither LED responds when I attempt to toggle them. I have verified the configuration using the S32 Design Studio's Pin Settings and Pin Configuration tool—both PTD15 and PTD16 are set as GPIO outputs. I have also cross checked it in the debugger section by reading the respective PCR registers.

I have also implemented a for loop to iterate over a range of channel addresses, including 0x006F and 0x0070, in an attempt to detect any response from the LEDs. However, no visible output was observed.

The question is now why does this happen? Am I missing on a specfic constraint?

タグ(1)
0 件の賞賛
返信
1 解決策
680件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @yousefdessouki123 

According to the information provided, the pin assignments for the RGB_LED are correct.

However, I am confused about the section of code where you toggle the pin state. The Dio_WriteChannel() function requires two parameters: the channel ID and the desired logic level. For reference, the channel ID for PTD15 is 0x006F and for PTD16 is 0x0070, which you have correctly identified.

That said, in your code, the variable "i" is used to iterate from trial (0x0000) to 0x009E, and its value is passed as the channel ID to Dio_WriteChannel(). Could you clarify if this is the intended behavior? It seems that each LED color is being toggled only once during this loop. If your goal is to toggle specific LEDs, I would recommend passing the known channel IDs (e.g., 0x006F, 0x0070) directly to the function, rather than using "i" as the channel ID, since you already know the exact values you want to control.

Additionally, I am not sure which version of the RTD you are using, but since you are working with S32DS, please ensure that the pins are properly configured in both the Pin Tool and the Peripheral Tool.

 

BR, VaneB

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
681件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @yousefdessouki123 

According to the information provided, the pin assignments for the RGB_LED are correct.

However, I am confused about the section of code where you toggle the pin state. The Dio_WriteChannel() function requires two parameters: the channel ID and the desired logic level. For reference, the channel ID for PTD15 is 0x006F and for PTD16 is 0x0070, which you have correctly identified.

That said, in your code, the variable "i" is used to iterate from trial (0x0000) to 0x009E, and its value is passed as the channel ID to Dio_WriteChannel(). Could you clarify if this is the intended behavior? It seems that each LED color is being toggled only once during this loop. If your goal is to toggle specific LEDs, I would recommend passing the known channel IDs (e.g., 0x006F, 0x0070) directly to the function, rather than using "i" as the channel ID, since you already know the exact values you want to control.

Additionally, I am not sure which version of the RTD you are using, but since you are working with S32DS, please ensure that the pins are properly configured in both the Pin Tool and the Peripheral Tool.

 

BR, VaneB

0 件の賞賛
返信