when call TFT_eSprite drawString, crash down



  • when i call TFT_eSprite method drawString, system crash down and reboot, code as following:

    M5.Lcd.fillScreen(TFT_BLACK);
    TFT_eSprite tftSprite = TFT_eSprite(&M5.Lcd);
    tftSprite.createSprite(320, 120);
    while (true)
    {
    if(SoundWave::suspend) {
    TaskHandle_t hTask = xTaskGetCurrentTaskHandle();
    vTaskSuspend(hTask);
    }
    uint32_t ulNotificationValue = ulTaskNotifyTake(pdTRUE, xMaxBlockTime);
    if (ulNotificationValue > 0)
    {
    tftSprite.fillSprite(TFT_BLACK);
    tftSprite.drawString("hello",10,20,TFT_WHITE);
    tftSprite.pushSprite(0,60);
    }
    }
    why?