Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Armin_PP
    • Continue chat with Armin_PP
    • Start new chat with Armin_PP
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Armin_PP

    @Armin_PP

    0
    Reputation
    4
    Posts
    567
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website www.armin-pressler.at/ Location Austria

    Armin_PP Follow

    Posts made by Armin_PP

    • RE: Core2 should turn off after USB is disconnected

      @felmue said in Core2 should turn off after USB is disconnected:

      M5Core2

      Good morning Felix,
      thank you for your quick reply :-)

      So I have to disassemble the device and can disconnect the battery I suppose...
      That is of course obvious - I didn't think about it, silly me ;-)

      My goal is - if possible - I would like to do a shutdown few seconds after disconnecting the USB to save all the data on the SD card in time and close the file.
      Later, when the USB voltage is back, the device should boot again automatically

      Is this possible?





      May I ask you where to find more information about API or Power management?
      Because m5.Axp.isACIN() is not described at [https://docs.m5stack.com/en/api/core2/axp192_core2](link url) and also not in the source code AXP192.cpp. So I can only guess what some functions will do...



      Thanks again in advance for your help!

      posted in Core 2
      Armin_PP
    • Core2 should turn off after USB is disconnected

      Hello,
      I got my first Core2 and it's pretty impressive.

      But I want to turn off the device after the USB port is disconnected.

      With Core Gray this was possible with M5.Power.setPowerVin(false);
      How can I handle this with the Core2?

      Thanks in advance for any help!

      posted in Core 2
      Armin_PP
    • RE: M5Stack: switch from SD to sdFat library

      Hello Gorka,
      after a lot of trial and error I found a solution, wich is working (for me) on 2 M5Stack gray with different SD cards.

      It is possible to use both librarys (SD and sdFat) in parallel, but there are some settings to make:

      // in the main file define the max SPI speed
      #define SPI_SPEED SD_SCK_MHZ(25)                             // MHz: OK 4, 10, 20, 25  ->  too much: 29, 30, 40, 50 causes errors
      #define SD_CONFIG SdSpiConfig(TFCARD_CS_PIN, SHARED_SPI, SPI_SPEED) // TFCARD_CS_PIN is defined in M5Stack Config.h (Pin 4)
      
      if (!sd.begin(SD_CONFIG)) {}
      (...)
      
      // in file SdFat\src\SdFatConfig.h    at Line 100:
      #define ENABLE_DEDICATED_SPI 0        // (from 1 -> 0)
      
      • TFCARD_CS_PIN is defined in M5Stack Config.h (Pin 4)
      • SHARED_SPI / ENABLE_DEDICATED_SPI 0 is choosen because SD card and TFT are sharing one SPI bus
      • SPI_SPEED is max 25 MHz, I don't know why, but at >25 MHz the sdFat library crashes...

      .
      I made some benchmarks and a test file, they are located at my github repository, feel free to test it...
      https://github.com/ArminPP/sdFAT-M5Stack

      Kind regards, Armin

      posted in Arduino
      Armin_PP
    • M5Stack: switch from SD to sdFat library

      Good evening,
      I would like to switch from the SD library to the sdFat library, as it also supports long file names.
      Unfortunately, the SD library is hard-coded and integrated in the M5Stack library.

      How can I now use sdFat exclusively?

      Thank you very much for tips and help.

      Kind regards, Armin

      posted in Arduino
      Armin_PP