Ignore:
Timestamp:
Oct 15, 2026, 3:03:59 PM (3 weeks ago)
Author:
Zed
Message:

Now, I can see main App RTT-output, but not from FSBL, but it is better than like it was before.

Location:
trunk/firmware/App/SES/Core/Tasks/Src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/firmware/App/SES/Core/Tasks/Src/mainTask.cpp

    r33 r35  
    1616                HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin);
    1717                osDelay(1000U);
    18                 printf("Programm is running at %u MHz\n", SystemCoreClock / 1000000U);
     18                printf("Main programm is running at %u MHz\n", SystemCoreClock / 1000000U);
    1919
    2020        }
  • trunk/firmware/App/SES/Core/Tasks/Src/sdmmcTask.cpp

    r34 r35  
    3737        static int insertionDetectionCnt, extractionDetectionCnt;
    3838
     39        fx_system_initialize();                                                                                                         // Initialize FileX
     40
    3941        while(1)
    4042        {
    … …  
    5759                                }
    5860                                else
    59                                 {
    6061                                        insertionDetectionCnt = 0;
    61                                         printf("SD-card extraction detected\n");
    62                                 }
    6362                                break;
    6463
    6564                        case SdCardState::Inserted:
    66                                 if (HAL_GPIO_ReadPin(SD_PRESENCE_GPIO_Port, SD_PRESENCE_Pin) == SD_NOT_PRESENT)
     65                                if (HAL_GPIO_ReadPin(SD_PRESENCE_GPIO_Port, SD_PRESENCE_Pin) == SD_PRESENT)
    6766                                {
    68                                         extractionDetectionCnt = 0;
    69                                         if (insertionDetectionCnt > (1000U / SD_PRESENCE_SCAN_RATE_ms))
    70                                         {       // Here we can be sure that SD-card is really present
    71                                                 if (sdLastState == SdCardState::NotPresent)
     67                                        insertionDetectionCnt = 0;
     68                                        if (extractionDetectionCnt > (1000U / SD_PRESENCE_SCAN_RATE_ms))
     69                                        {       // Here we can be sure that SD-card is really extracted
     70                                                if (sdLastState == SdCardState::Inserted)
    7271                                                {
    73                                                         sdLastState = sdCurrentState = SdCardState::Inserted;
    74                                                         printf("SD-card was inserted\n");
     72                                                        sdLastState = sdCurrentState = SdCardState::NotPresent;
     73                                                        printf("SD-card was extracted\n");
    7574                                                }
    7675                                        }
    7776                                        else
    78                                                 ++insertionDetectionCnt;
     77                                                ++extractionDetectionCnt;
    7978                                }
    8079                                else
    81                                 {
    82                                         insertionDetectionCnt = 0;
    83                                         printf("SD-card extraction detected\n");
    84                                 }
     80                                        extractionDetectionCnt = 0;
    8581                                break;
    8682
    87                         case SdCardState::Initialized:
    88                                 break;
    89 
    90                         case SdCardState::Deinitialized:
    91                                 break;
    92 
    93                         case SdCardState::Error:
    94                                 break;
     83                        case SdCardState::Initialized: break;
     84                        case SdCardState::Deinitialized: break;
     85                        case SdCardState::Error: break;
    9586                }
    9687                osDelay(SD_PRESENCE_SCAN_RATE_ms);
Note: See TracChangeset for help on using the changeset viewer.