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! 

  • satya mishra said:
     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.  

    You (must) have (some) ideas - is that not so?     It proves,  "Not too compelling" - when "helpers" are asked to do ... "ALL of the diagnostic work!"

    Many do not mind "assisting" - yet it is "you" who must,  "Think more deeply - and perform (most) of the work!"

    These questions may help "you" to make a proper diagnosis:

    • As "Writing to the SD card" causes your issue - why not, "Write ONLY when your Motor is "Off/Not running?"    Simple 'time-shifting" - solves your issue - does it not?   (You've offered up NO justification as to why the "SD card write" must occur "during" a motor run.
    • Can your "Writing to the SD card" be broken down into multiple, yet far shorter duration, "chunks."    This likely proves less impactful upon your motor - is that not so?
    • Can your PWM Generation be more "automated" - so MCU Program intervention - is much reduced?    (which lessens the impact any SD Card writing - may cause.)
    • How sure are you that your report of,  "PWM Halted/OFF" - for ONLY a few mSec. - is accurate?    Should (only) a few milliseconds be lost - the motor's inertia - should absorb substantial amounts of that "Lost Drive Signal" - lessening any ill effects.

    More "detail" - describing the (suspected) impact upon your motor - when "few milliseconds of Motor Drive is lost" - would prove most useful...

  • cb1_mobile said:

    satya mishra
     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.  

    You (must) have (some) ideas - is that not so?     It proves,  "Not too compelling" - when "helpers" are asked to do ... "ALL of the diagnostic work!"

    Many do not mind "assisting" - yet it is "you" who must,  "Think more deeply - and perform (most) of the work!"

    These questions may help "you" to make a proper diagnosis:

    • As "Writing to the SD card" causes your issue - why not, "Write ONLY when your Motor is "Off/Not running?"    Simple 'time-shifting" - solves your issue - does it not?   (You've offered up NO justification as to why the "SD card write" must occur "during" a motor run.
    • Can your "Writing to the SD card" be broken down into multiple, yet far shorter duration, "chunks."    This likely proves less impactful upon your motor - is that not so?
    • Can your PWM Generation be more "automated" - so MCU Program intervention - is much reduced?    (which lessens the impact any SD Card writing - may cause.)
    • How sure are you that your report of,  "PWM Halted/OFF" - for ONLY a few mSec. - is accurate?    Should (only) a few milliseconds be lost - the motor's inertia - should absorb substantial amounts of that "Lost Drive Signal" - lessening any ill effects.

    More "detail" - describing the (suspected) impact upon your motor - when "few milliseconds of Motor Drive is lost" - would prove most useful...

    thank you sir for giving me response,

    1.  In my project , I am writing the data( Like as Voltage, Current , Vdc.....) in SD_CARD with motor ON/OFF both condition.

    2.  

    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);

    3.  Here, For debugging purpose , i am using CRO.

      My Project is working for 3-phase Motor,  So here , I am using 3-PWM Generator means  6-PWM Output and by help of CRO I got the PWM O/P Fault.

  • There is another user who posted about PWM interruption when writing to an SD card. It looks like that system is getting resets. You might want to check this thread:
    e2e.ti.com/.../680803