AnsweredAssumed Answered

Problems with GPIO and PWM 180-Pin Probing

Question asked by yvg on Jul 21, 2015
Latest reply on Aug 12, 2015 by yvg

Hi there!

 

I am using the CM408f with the 180-Pin Probing Test connected to J6.

Is the following correlation of the pins of the processor and the lead of the 180-Pin Probing correct?

 

PA_13  ---- Lead number  1

PA_07  ---- Lead number  14

PE_05  ---- LED3 ---Lead number 91

PE_06  ---- LED2 ---Lead number 90

PE_07  ---- LED1 ---Lead number 89

 

Is the software configuration correct for the GPIO output pins?


To check it, I modified the Button_LED_GPIO.c  example code.

    First. I introduced Timer ISR.

    Second. Inside the timer ISR the LED3 toggles every 1000 interruptions.

 

The results are:


    1. Once the code is downloaded, the LED3 blinks. Therefore, the ISR is working well.


      I checked the LED3 (directly in the LED) with the scope; then, I could see the square signal. But no signal was found, when I checked the PIN 91 in the pin probing .

 

    2. LED1 and LED2. I switched SW4 and SW5, LED1 and LED2 switched on/off respectively (toggle).


    I checked directly in the LEDs, and the signal was 1 and 0 logic (3 volts and 0 volts), but I tried to see the same signal in their corresponding pins with the scope (pins 89 and 90 of the pin probing board) and no signal was found .

 

I also changed the pin probing from J6 to J4 and It doesn’t work.

 

You will find the c-code below.

 

I would be very grateful if someone can help.

 

 

 

//******************************************************

// Piece of code introduced in Button_LED_GPIO.c

//******************************************************

 

 

// Timer3 ISR setup

 

void aSetupSchedulerIrq(void){

    *pREG_TIMER0_TMR3_CFG = 0x883C;

    *pREG_TIMER0_TMR3_PER = (uint32_t)8000;

    *pREG_TIMER0_TMR3_WID = (uint32_t)4000;

 

    adi_int_InstallHandler((IRQn_Type)INTR_TIMER0_TMR3, TIMER0_TMR3_ISR, 0, true);

 

    NVIC_SetPriority((IRQn_Type)INTR_TIMER0_TMR3, 1);

    NVIC_EnableIRQ((IRQn_Type)INTR_TIMER0_TMR3);

    *pREG_TIMER0_DATA_IMSK &= 0xF5;

    *pREG_TIMER0_RUN_SET = 0xA;

}

 

// Timer3 ISR 


void TIMER0_TMR3_ISR(uint32_t iid, void* handlerArg){

    *pREG_TIMER0_DATA_ILAT = BITM_TIMER_DATA_ILAT_TMR03;

    auxiliar_count++;

    if (auxiliar_count >=1000){

          auxiliar_count = 0;

          adi_gpio_Toggle(ADI_GPIO_PORT_A, ADI_GPIO_PIN_13);

          adi_gpio_Toggle(ADI_GPIO_PORT_E, ADI_GPIO_PIN_5);  // LED3

    }

}

// End of the code ***********************************

 

 

 

//******************************************************

// The GPIOs are configured in output mode, see code below.

//******************************************************

 

/* set GPIO output LED 1 */

  result = adi_gpio_SetDirection(

                                ADI_GPIO_PORT_E,

                                ADI_GPIO_PIN_7,

                                ADI_GPIO_DIRECTION_OUTPUT);

 

  CheckResult(result, "adi_gpio_SetDirection");

 

/* set GPIO output PA_07 -- PIN 14 */

  result = adi_gpio_SetDirection(

                              ADI_GPIO_PORT_E,

                              ADI_GPIO_PIN_5,

                              ADI_GPIO_DIRECTION_OUTPUT);

  CheckResult(result, "adi_gpio_SetDirection");

 

 

  /* set GPIO output PA_13 -- PIN 1 */

  result = adi_gpio_SetDirection(

                              ADI_GPIO_PORT_A,

                              ADI_GPIO_PIN_13,

                              ADI_GPIO_DIRECTION_OUTPUT);

  CheckResult(result, "adi_gpio_SetDirection");

 

  /* set GPIO output LED 2 */

  result = adi_gpio_SetDirection(

                                ADI_GPIO_PORT_E,

                                ADI_GPIO_PIN_6,

                                ADI_GPIO_DIRECTION_OUTPUT);

  CheckResult(result, "adi_gpio_SetDirection");

 

// End of the code ***********************************

Outcomes