Navigation

    M5Stack Community

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

    sheepDog

    @sheepDog

    2
    Reputation
    54
    Posts
    1493
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    sheepDog Follow

    Posts made by sheepDog

    • Core2: WS2812 and interrupter

      Hello,

      I use a lot of own libraries to control my home. Last library was a small extension of Adafruit_NeoPixel to show some status information.

      I tested with four libraries (M5Core2.h, Wifi.h, Adafruit_NeoPixel.h and my lib) with a small test program with Arduino IDE and it worked fine. I used 16*16 led ws2812.

      Then a changed back to my ESP-IDF and use the some libraries and some more stuff. If I started to switch some less on my WS2812 in green color, it worked 4 or 5 times without problems. At the next one switching event I got a problem on the second half of the leds:

      • Some switch the color from green to blue

      • Some led switch incorrect on

      The first 100 to 120 leds all always correct. I think it is a interrupt problem, but in then Adafruit_NeoPixel.h interrupts stopped. I double-checked if this part worked:

        // NRF52 may use PWM + DMA (if available), may not need to disable interrupt
      #if !( defined(NRF52) || defined(NRF52_SERIES) )
        noInterrupts(); // Need 100% focus on instruction timing
      #endif
      

      I also stop interrupts im my library for the critical part, but it didn't work. My unfounded suspicion is a unstoppable interrupt in M5Core2.h or similar.

      Do anyone have an idea?

      posted in Core 2
      S
      sheepDog
    • Bus Mapping M5Core2 <-> M5Stack

      Hello,

      in past I used some M5Stack modules at M5Stack and now I like to migrate to M5Core2. The challenge ist the different bus system.

      Pin	M5Stack	M5Core2
      GND	2	1,3,5
      SCK	4	11
      MISO	6	9
      RESET	8	6
      nu	10	-
      nu	12	-
      A0	14	-
      A1	16	-
      A2	18	-
      A3	20	-
      A4	22	-
      A5	24	-
      AREF	26	-
      IO12	28	-
      IO13	30	-
      5V	1	28
      MOSI	3	7
      SS	5	-
      D0/RX	7	13
      D1/Tx	9	14
      D2/SDA	11	SYS:17, EXT:19
      D3/SCI	13	SYS:18, EXT:20
      D4	15	-
      D5	17	-
      D6	19	-
      D7	21	-
      IO8	23	-
      IO9	25	-
      IO10	27	-
      IO11	29	-
      IO35	-	2
      IO36	-	4
      IO25	-	8
      IO26	-	10
      3,3V	-	12
      Rx2	-	15
      Tx2	-	16
      IO19	-	22
      IO0	-	24
      IO34	-	26
      BAT	-	30
      

      Who has experience with using an M5Stack module on an M5Core2?

      posted in Core 2
      S
      sheepDog
    • RE: Big Font

      Hello @Rop,

      thank you for your help. Do you test it with M5Core2-enviroment?
      I generated a "FreeSerif34pt7b" from you website and compilation of my
      program was ok.

      If I started the M5Core2 and I used the new font to see the time, for example 08:29,
      I saw 00 88 :: 22 99 in the first line und a second line with the top of the characters.

      It seemed, that the length of the characters in the font was not okay.

      posted in Core 2
      S
      sheepDog
    • Big Font

      Hello,

      I need a big font for my application, in the factory example the EVA font is used.

      I like to use a font like "Font72rle".
      First step is to include the new font:

      #include <Fonts/Font72rle.h>
      

      How can I use the new font?
      The function setFreeFont didn't work for me.

      posted in Core 2
      S
      sheepDog
    • RE: Installing "M5Stack-IDF" will result in errors

      Hi @brus,

      thank you for providing your repro. In the meantime I've put together my own version and I'm waiting for the official version of m5stack.

      posted in ESP - IDF
      S
      sheepDog
    • RE: Core2 RTC challenge

      Hi @felmue,

      I started M5Core2-Factory test, disconnected USB and go away. About 5 hours later I came back and tried to switch on M5Core. Nothing happened.

      I connected USB, flashed the M5Core2 with the factory test program and everything worked fine.

      At the last day I used my RTC-library with alarm functions and more and it worked continuously.

      Cheers

      posted in Core 2
      S
      sheepDog
    • RE: Core2 RTC challenge

      Hi @felmue,

      yes, I believe that I wrote incorrect values in one (or more) of the RTC registers and that the BM8563 was factory or default reset due to the dead (!) battery.

      Before I wrote back all registers with data sheet informations and so the RTC did not get back on track.

      Thanks,
      Uwe

      posted in Core 2
      S
      sheepDog
    • RE: Core2 RTC challenge

      Hello @felmue,

      thanks for your answer. I meant that writing the value 0 in all status registers would not reset the BM8563!

      I used a similar function for reading and writing:

      
      void RTC::readBytes(uint8_t reg, uint8_t nbytes, uint8_t *data) {
        Wire1.beginTransmission(BM8563_ADDRESS);
        Wire1.write(reg);
        Wire1.endTransmission();
        Wire1.requestFrom(BM8563_ADDRESS, nbytes);
        uint8_t index = 0;
        while( Wire1.available() )
            data[index++] = Wire1.read();
      }
      
      
      void RTC::writeBytes(uint8_t reg, uint8_t nbytes, uint8_t *data) {
        Wire1.beginTransmission(BM8563_ADDRESS);
        Wire1.write(reg);
        for (uint8_t i = 0; i < nbytes; i++)
            Wire1.write(data[i]);
        Wire1.endTransmission();
      }
      

      In the meantime I found an old fashion solution, because a fresh copy of M5Core2 library didn't not help. The problem was inside the registers of BM8563.

      I disconnected the M5Core2 from USB and wait until the battery was empty. Now it's working again.
      the problem was to factory reset the BM8563.

      posted in Core 2
      S
      sheepDog
    • Core2 RTC challenge

      Hello,

      the Core2 contains an RTC component, the BM8563. The RTC library has so far only a few functions and uses e.g. the status register does not return.

      I have now expanded the library to include these alarm functions:

         void GetAlarm (RTC_AlarmTypeDef * RTC_AlarmStruct);
         void SetAlarm (RTC_AlarmTypeDef * RTC_AlarmStruct);
      
         void enableAlarm ();
         void disableAlarm ();
         void resetAlarm ();
         bool alarmActive ();
      

      At start the functions worked very well, but now I can no longer use the BM8563 in normal way. At the start it always outputs the date 05.01.00 and a time from 00:07:00 to 00:07:07 and then starts again from 00:07:00. Other Arduino-libraries also show the same effect.

      Resetting all registers from 00 to 0E to the value zero didn't help either, does anyone have an idea?

      posted in Core 2
      S
      sheepDog