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.

Why SSI1 in F port can‘t recieve anything。

Other Parts Discussed in Thread: TM4C123GE6PZ

SSI1 in D port is work, and any else SSI0 - SSI3。

But SSI1 in F port can’t recieve anything,the clock and dataout is work。

  • Can you mention the TIVA Part Number. That would make it easier to check the appropriate data sheet for Pin Mapping.

    Amit

  • 980  YF

    TM4C123GE6PZ

    3AAD68W

    G4

    I have try several chip,all same。

  • pony han said:
    But SSI1 in F port can’t recieve anything,the clock and dataout is work。

     Hi Pony, your code is hand written or from TIVA PINMux?

     If by hand did you checked for unlocking default?

  • I think this is a serious problem。any help to avoid this?

  • HI  Roberto!

    what is unlocking?

    Two way all try。sample project is CC3000‘s simple link。worked in SSI0,but fault SSI1.

    hand code is simple,test ALL SSI0 to SSI3 all port but SSI1 in F port.

    code like this.

    ////////////////////////////////////////

    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI1);

    GPIOPinConfigure(GPIO_PF2_SSI1CLK);
    GPIOPinConfigure(GPIO_PF0_SSI1RX);
    GPIOPinConfigure(GPIO_PF1_SSI1TX);


    GPIOPinTypeSSI(GPIO_PORTF_BASE, GPIO_PIN_2|GPIO_PIN_0|GPIO_PIN_1);

    GPIODirModeSet(GPIO_PORTF_BASE, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2, GPIO_DIR_MODE_HW);



    SSIConfigSetExpClk(SSI1_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0,
    SSI_MODE_MASTER, 20000000, 8);

    SSIEnable(SSI1_BASE);

    unsigned long senddata = 0xA5;
    unsigned long recvdata;

    while(1)
    {
    SSIDataPut(SSI1_BASE, senddata);
    SSIDataGet(SSI1_BASE, &recvdata);
    }

    ///////////////////////////////////////////

    Pull up PF0 to high, but can't get 0xFF, always return 0;

  • Hi,

    PF0 pin needs a special treatment, since this is started as NMI by default. The easiest way to overcome this is to use PinMux utility, which writes the code for you (until you will learn the micro) - you should declare the pins and their functions and the right configuration is delivered to you.

    Also, do not neglect the user manual reading - a chapter a day keeps the doctor away!

    Petrei

  • If you still want to hand write the code (instead of using the PinMux utility which is doing it way too better) then add the following code before you call GPIOPinConfigure API's

    HWREG(GPIO_PORTF_AHB_BASE+GPIO_O_LOCK) = GPIO_LOCK_KEY;

    HWREG(GPIO_PORTF_AHB_BASE+GPIO_O_CR) |= GPIO_PIN_7;

    That should allow you to program the PF0 Pin

  • HI amit.

    after run the line.

    HWREG(GPIO_PORTF_AHB_BASE+GPIO_O_CR) |= GPIO_PIN_7;

    FaultISR()  caused.

  • Should have been careful not to use GPIO_PORTF_AHB_BASE. Replace the same with GPIO_PORTF_BASE

    Do make sure that the SysCtlPeripheralEnable for GPIO PORT-F has been executed otherwise another FAULT ISR would come up.

    Amit

  • Could not work with change GPIO_PORTF_AHB_BASE to GPIO_PORTF_BASE.

    But i get the direction to solve that. thank you help!

     

    Why TIVA ware can't handle this? 

  • pony han said:
    Why TIVA ware can't handle this? 

    You need TIVA PINMux, to configure pin and generate correct startup code with peripheral initiation.

     TIVA Ware are libraries to use peripherals, if you don't initialize all peripheral in the correct way then thing fail.

     Sometime as I wrote to you and Petrei replicated unlocking sequence is needed to remove default, reading manual can help but one chapter a day require too much time to fully understand how this processor work. you need at first read all chapter regarding pin configuration, then you can start one peripheral at time and not all are necessary.