- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using TC399. And I made a simple program to set the P31_0 pin to Low.
However, it cannot be set to LOW.
P31 register "0xF003BF00: OUT" is 0x00000000. And "0xF003BF24: IN" is 0x000000FF even though it is set to LOW.
Why can't it be set to LOW?
static uint8 uDisPort ;
void core0_main (void)
{
IfxCpu_enableInterrupts();
IfxScuWdt_disableCpuWatchdog (IfxScuWdt_getCpuWatchdogPassword ());
IfxScuWdt_disableSafetyWatchdog (IfxScuWdt_getSafetyWatchdogPassword ());
IfxCpu_emitEvent(&cpuSyncEvent);
IfxCpu_waitEvent(&cpuSyncEvent, 1);
IfxScuCcu_initConfig( &IfxScuCcu_testClockConfig );
IfxScuCcu_init( &IfxScuCcu_testClockConfig );
g_ScuClock.pllfreq = IfxScuCcu_getPllFrequency();
g_ScuClock.cpufreq = IfxScuCcu_getCpuFrequency( IfxCpu_getCoreIndex() );
g_ScuClock.spbfreq = IfxScuCcu_getSpbFrequency();
g_ScuClock.srifreq = IfxScuCcu_getSriFrequency();
g_ScuClock.stmfreq = IfxScuCcu_getStmFrequency();
gpio_init_pins();
while (1)
{
uDisPort = IfxPort_getPinState( &MODULE_P31 , 0U );
IfxPort_setPinState( &MODULE_P31,0 , IfxPort_State_low);
}
return;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two comments, the first is that it appears you have a problem with the board or device on P31.0. The port driver is trying to drive the pin high but it is being read as low.
Second comment is that P31.0 is a FAST pad. You are not allowed to use Speed grade 4 for this type of pad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide what the value of the P31_IOCR0 register is? The PC0 bitfield coding determines the port line functionality. For example if you want P31.0 to be a push/pull general purpose output then P31_IOCR.B.PC0 should be 0x10.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll paste the register as an image.
And I have one concern.
For example , I configured P31_0 using pinmapper.
As the result , aurix_pin_mappings.h is displayed as below.
As a result, aurix_pin_mappings.h is displayed as below.
The register shows speed grade 3 even though I set it to speed grade 4.
// p31_0
#define IFXCFG_PORT_GPIO10 IfxPort_P31_0
#define IFXCFG_PORT_GPIO10_MODE IfxPort_Mode_outputPushPullGeneral
#define IFXCFG_PORT_GPIO10_PAD_DRIVER IfxPort_PadDriver_cmosAutomotiveSpeed4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two comments, the first is that it appears you have a problem with the board or device on P31.0. The port driver is trying to drive the pin high but it is being read as low.
Second comment is that P31.0 is a FAST pad. You are not allowed to use Speed grade 4 for this type of pad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I appreciate you.
It was helpful.
I will review hardware checks and pin assignments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
H/W is no problem.
It became possible to output by changing the EBU_MODCON register.