DIO Configuration not setting output

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DIO Configuration not setting output

1,128 次查看
CCaruana
Contributor I

Hello,

This is my first NXP Project using MBDT. I have the S32K311[NHTOMPAST] on a custom PCB that I am attempting to validate. There are a few output pins attached to LEDs I'd like to see turn on/off but have had mostly poor results; the pins in question are:

"HOLDUP" = PTD12 (has LED attached)

"LED_PWM" = PTA11 (should work as digital gpio, ignore tha PWM in the name)

"LED_01" = PTC12

"LED_02" = PTC13

"LED_03" = PTA14

"LED_04" = PTE12

"LED_05" = PTB0

Yesterday, in a configuration I have since lost, I had HOLDUP, LED1, and LED2 turning on, so I believe they are connected electrically correctly. Interestingly enough, when I would attempt to drive LED3-5 it would turn on LED2. I believe that was a configuration issue, but I no longer have it. 

The configuration attached, from my knowledge, does nothing with my model. I am simply attempting to turn on the LEDs and keep them on. I started with an example configuration, added my pins, and deleted the ones I was not using (deleted PWMs, CAN, SPI, etc as I have other pins connected to hardware on this PCB... relays were cycling at a very high frequency so I tried my best to remove them).

After hours of fixing errors related to the things I deleted, I can build my model and flash the board. The board has a very faint buzzing sound (nothing like the relays) which makes me think something unintended is occurring. The LEDs do not turn on. I have looked around the hardware settings, configuration settings, model settings, and the simulink blocks and I have run out of ideas.

I presume the issues are software related, although this is a test of the first PCB made. There is a chance the hardware has an issue, but I'd like to proceed thinking this is a software problem.

Any help is appreciated, I've also attached images if it makes it easier to review. Also note, I've attempted setting my outputs as input/outputs towards the end of my day- neither worked. I apologize for the mess of files, I started with EEETEst.mex but changed a setting in my hardware settings, it now generates a new .mex file when I build.

0 项奖励
回复
1 回复

1,098 次查看
dragostoma
NXP Employee
NXP Employee

Hi, @CCaruana,

Thank you for your interest into Model-Based Design Toolbox for S32K3.

First of all, the fact that your configuration with the model name is no longer generated is because you tried to use the referenced configuration functionality. This is a more complex functionality that allows you to share a configuration with multiple models (more details here). But this is not your case.  To reset the location to the default value, please run the attached restoreRefConfigLocation.p script, by right-clicking and running, when you have the Simulink model open. This way you will have the default value and you will no longer use this functionality.

 

Untitled picture_ref.png

 

Secondly, the pin configuration you mentioned is correct, if the custom PCB is correctly configured from a hardware point of view, it should work. You can test the output of each pin after running the attached example and see the current behavior.

 

It is impossible for me to test on the board, since you have a custom board, but from the checks made in the configuration project, things seem fine when it comes to pins.
Let us know if you make progress or if you encounter other difficulties.

 

Best regards,

Dragos

0 项奖励
回复