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.

CCS/TM4C123GH6PGE: SD_Card

Part Number: TM4C123GH6PGE

Tool/software: Code Composer Studio

Hi All,

My platform is TM4C123GH6PGE

CCS version 6.2,

I am doing Solar Water Pump project,  This project  is working for 3-Phase AC Motor which control by PWM.

Now,

       In same project , I added the SD_Card Features . It is working but  Problem is occurring when controller write the data in SD_Card.

In this time period My PWM output halt/off( For few milliseconds) after again It,s working in normal condition.

    Please help me, How to resolve this issue?

Thank you! 

  • Hello Satya,

    Is the PWM running on an interrupt based system? How about the SD Card? Could there be a contention in interrupt priority?
  • thank you sir for giving me response,

    Yes sir, My PWM  running on an interrupt based system... and priority like as....

      IntMasterEnable();

      IntPrioritySet(INT_TIMER0A, 0x00);

    //   IntPrioritySet( INT_HIBERNATE_TM4C123, 0x30);

      IntPrioritySet(INT_PWM0_0_TM4C123, 0x10);

      IntPrioritySet(INT_PWM0_1_TM4C123, 0x20);

      IntPrioritySet(INT_PWM0_2_TM4C123, 0x30);

      IntPrioritySet(INT_ADC0SS0_TM4C123, 0x40);

             IntPrioritySet(INT_TIMER2A, 0x50);

      IntPrioritySet(INT_TIMER1A, 0x60);

      IntPrioritySet( INT_HIBERNATE_TM4C123, 0x70);

              IntPrioritySet(FAULT_SYSTICK, 0x80);

    and for SD_CARD,,,,,

       i am using this type of function for write purpose....

    iFResult = f_mount(0, &g_sFatFs);


    iFResult = f_open(&g_sFileObject, filename, FA_WRITE|FA_OPEN_ALWAYS| FA_READ);

    iFResult=f_lseek(&g_sFileObject, f_size(&g_sFileObject));


    iFResult = f_write(&g_sFileObject, buf2, sizeof(buf2) - 1, & ui32BytesWrite);
    iFResult = f_sync(&g_sFileObject);