This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC13x2, CC26x2 SimpleLink



Hi,

we're trying to config a gpio as output and to write to it in the boot loader (nortos) mode. 

we try a lot of ways to do that but without any sucessful.

1.

IOCPortConfigureSet(GPIO_DOUT23_20_DIO23,IOC_IOCFG13_PORT_ID_GPIO,IOC_IOMODE_OPEN_DRAIN_NORMAL);

GPIO_writeDio(IOID_21, 1);

2.

IOCPortConfigureSet(GPIO_DOUT23_20_DIO23,IOC_IOCFG13_PORT_ID_GPIO,IOC_IOMODE_OPEN_DRAIN_NORMAL);

GPIO_setDio(IOID_21, 1);

3. GPIO_setOutputEnableDio(IOID_22, GPIO_OUTPUT_ENABLE);

GPIO_writeDio(IOID_21, 1);

4. 

IOCPortConfigureSet(GPIO_DOUT23_20_DIO23,IOC_IOCFG13_PORT_ID_GPIO,IOC_IOMODE_OPEN_DRAIN_NORMAL);

GPIO_setOutputEnableDio(IOID_22, GPIO_OUTPUT_ENABLE);

GPIO_setDio(IOID_21, 1);

5.  HWREGB(IOC_O_IOCFG21+0x6000) = IOC_IOCFG21_PORT_ID_GPIO ;
HWREGB(GPIO_BASE + GPIO_O_DOE31_0) = ((HWREGB(GPIO_O_DOE31_0)) | (1 << 21));
HWREGB(GPIO_DOUT23_20_DIO23) = (HWREGB(GPIO_DOUT23_20_DIO23) |(0x100));
OCPinTypeGpioOutput(IOID_21);

GPIO_setDio(IOID_21, 1);

and a lot of other ways, but nothing works with us.

please advise how we can do that in the bootloader.

  • Please provide info regarding which device you are using and which SDK version you are working with.

    Siri

  • Problem solved by Turning GPIO power on.

    /* GPIO power up*/
    PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
    while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH)
    != PRCM_DOMAIN_POWER_ON);

    PRCMPeripheralRunEnable(PRCM_PERIPH_GPIO);
    PRCMLoadSet();
    while (!PRCMLoadGet());


    /* set direction */
    GPIO_setOutputEnableDio(IOID_14, GPIO_OUTPUT_ENABLE);

    GPIO_setDio(IOID_14);