Pmod SSEL pin as GPIO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pmod SSEL pin as GPIO

Jump to solution
917 Views
frankchiu
Contributor II

HI,

Recently I am using LPC43S67 & A70CM Cloud Connectivity Kit (OM13086),

although I am using the main board OM13084.

I have a problem that SSEL pin on Pmod (J3) connector is not controllable.

I try to control it as a GPIO pin.

I connect a LED between the SSEL pin and the GND pin of J3 connector.

And no matter I set the GPIO state of that pin to true or false, the LED is not on.

Similar code works on another GPIO pin, P1.5.

Do I miss something?

The following is my code:

#if defined (__USE_LPCOPEN)
#if defined(NO_BOARD_LIB)
#include "chip.h"
#else
#include "board.h"
#endif
#endif

#include <cr_section_macros.h>

int main(void) {
#if defined (__USE_LPCOPEN)
    // Read clock settings and update SystemCoreClock variable
    SystemCoreClockUpdate();
#if !defined(NO_BOARD_LIB)
#if defined (__MULTICORE_MASTER) || defined (__MULTICORE_NONE)
    // Set up and initialize all required blocks and
    // functions related to the board hardware
    Board_Init();
#endif
    // Set the LED to the state of "On"
    Board_LED_Set(0, true);
#endif
#endif

    // TODO: insert code here
#if 1
    Chip_SCU_PinMuxSet(0x3, 8, (SCU_MODE_INACT | SCU_MODE_FUNC4));  /* P3.8 => GPIO5[11] */
    Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 5, 11);
    Chip_GPIO_SetPinState(LPC_GPIO_PORT, 5, 11, (bool) true);
//    Chip_GPIO_SetPinState(LPC_GPIO_PORT, 5, 11, (bool) false);
//    Chip_GPIO_SetPinOutHigh(LPC_GPIO_PORT, 5, 11);
//    Chip_GPIO_SetPinOutLow(LPC_GPIO_PORT, 5, 11);
#else
    Chip_SCU_PinMuxSet(0x3, 6, (SCU_MODE_INACT | SCU_MODE_FUNC0));  /* P3.6 => GPIO0[6] */
    Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 0, 6);
    Chip_GPIO_SetPinState(LPC_GPIO_PORT, 0, 6, (bool) true);
#endif
    // Force the counter to be placed into memory
    volatile static int i = 0 ;
    // Enter an infinite loop, just incrementing a counter
    while(1) {
        i++ ;
    }
    return 0 ;
}

Thanks for any help.

Frank

Labels (3)
1 Solution
680 Views
frankchiu
Contributor II

OK, I found the solution.

The SSEL pin of Pmod is not P3_8! Actually it is P1_0.

Because the only SPI_SSEL pin in the datasheet is P3_8, I think that way.

View solution in original post

0 Kudos
3 Replies
680 Views
frankchiu
Contributor II

By the way, are P3_3 / P3_6 / P3_7 / P3_8 (SPI pins) accessible on OM13084?

I don't find those labels on the board.

Thanks.

0 Kudos
680 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Frank,

It is good to hear you found a solution. Regarding the P3_3 / P3_6 / P3_7 / P3_8 pins, these pins are connected to the on-board SPIFI memory, that is why these pins were not routed to the board headers:

https://www.nxp.com/downloads/en/schematics/LPCX43xx_18xx_V3_Schematic_Rev-B.pdf 


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

681 Views
frankchiu
Contributor II

OK, I found the solution.

The SSEL pin of Pmod is not P3_8! Actually it is P1_0.

Because the only SPI_SSEL pin in the datasheet is P3_8, I think that way.

0 Kudos