Skip to content

NUVOTON M487KMCAN controller SPI_2 pin no. PG2 PG3 PG4 PF11 #54

@sank7028

Description

@sank7028

Hello sir ,
i am using SPI2 in my project.
void SPI2_Init(void)
{
SYS->GPG_MFPL &= ~(SYS_GPF_MFPH_PF11MFP_Pos | SYS_GPG_MFPL_PG4MFP_Pos | SYS_GPG_MFPL_PG3MFP_Pos | SYS_GPG_MFPL_PG2MFP_Pos);
SYS->GPG_MFPL |= (SYS_GPF_MFPH_PF11MFP_SPI2_MOSI | SYS_GPG_MFPL_PG4MFP_SPI2_MISO |SYS_GPG_MFPL_PG3MFP_SPI2_CLK | SYS_GPG_MFPL_PG2MFP_SPI2_SS);

   /* Configure SPI_FLASH_PORT as a master, MSB first, 8-bit transaction, SPI Mode-0 timing, clock is 24MHz */
   SPI_Open(SPI2, SPI_MASTER, SPI_MODE_0, 8, 3000000);
   /* Disable auto SS function, control SS signal manually */
   SPI_DisableAutoSS(SPI2);

}

this is my initialization . now in this case i write anything . its show me 0x00 on logic analyser. why this is happen ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions