Extconfig question

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
nikhil
Posts: 40
Joined: Thu Jan 03, 2013 8:46 pm

Extconfig question

Post by nikhil »

Hello,
I am trying to read two different pwm using STM32F4 mcu. I have successfully read pwm on pin PA7 using extconfig by refering to testhal example. Code looks like snippet below.

Code: Select all

static const EXTConfig extcfg = {
  {
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL } , 
    {EXT_CH_MODE_BOTH_EDGES | EXT_CH_MODE_AUTOSTART, extcb1 }, 
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL},
    {EXT_CH_MODE_DISABLED, NULL} 
  },
  EXT_MODE_EXTI(
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        EXT_MODE_GPIOA,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
        )

};


Now I wnt to configure pin PC7 in order to read another pwm with extcb2 function. However I am not able to define extconfig as both pins PA7 anf PC7 share same pin number. Can you help me out to define extconfig in order to use both PA7 and PC7 pins ?

--
nikhil
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Extconfig question

Post by Giovanni »

You can't. The STM32 does not allow the same bit on different ports, see the RM in the EXTI section.

Giovanni
Post Reply