Core2 + RS232F Module 13.2 UART2 not possible?
-
Hello @Hnerik-Schmidt
have a look at the topside of the module where the different GPIOs for different cores (M5Stack aka Core; M5Core2 aka Core2; M5CoreS3 aka CoreS3) are explained.
Note: The dip switches are labelled for M5Stack (Core) only.
So in order for M5Core2 to use GPIO13 and GPIO14 you'll need to set dip switch GPIO16 and GPIO17 to
on
.Thanks
Felix -
deleted
-
Ok so I might maybe probably have figured it out now.
I compared the GPIO pinout of core and core2 and they have moved the pins on core2 to corespond to the same pins so what was said earlier that I should dipswitch the rs232 thing to 16/17 is correct.
but at the same time the program should say 13/14. then it seems to play nicely, -
Hello @Hnerik-Schmidt
correct. I know it is a bit confusing. Most (if not all) modules have their GPIOs labelled for M5Stack (Core) and need some 'translation' when used with M5Core2 (Core2) or M5CoreS3 (CoreS3).
Note: M5Core2 (Core2) has internal PSRAM and while most ESP32 GPIOs can be reassigned for various functions, PSRAM can only be used with GPIO16 / 17. That is the reason M5Stack engineers replaced them with GPIO13 / 14 on the M5Stack bus.
Thanks
Felix -
@felmue @Hnerik-Schmidt could you share your working code? I'm having issue with M5Core2 + RS232F + UIFlow2.
I tried the below code to read from a serial port using RS232F module. I set the GPIO pins 16 and 17 to On on M5Core2. I just see None as the output.
I tried Execute mpy code that I found in another thread, but I get the same output "None".
-
-
@felmue I'm getting Invalid pin error with the UIFlow1 example using UIFlow2. I used tx=17 and rx=16.
Traceback (most recent call last): File "<stdin>", line 23, in <module> File "<stdin>", line 13, in setup ValueError: invalid pin
-
Hello @kumsat
Sorry, I meant recreate and adapt to M5Core2 accordingly.
For M5Core2 you'll need to chose GPIOs from the Core2 column. See picture here and set the DIP switches accordingly.
Note: the DIP switches are labelled for M5Core. So for instance if you want to use GPIO14 (of M5Core2) you need to set DIP switch 17. And GPIO13 (of M5Core2) corresponds to DIP switch 16.
Thanks
Felix -
@felmue I assumed so and tested both cases - tx: 17 & 14; rx: 16 & 13. In case of GPIO 14 and 13, I am not getting the invalid pin error but not receiving any data from the serial device either.
I used UART count of available in place of Remain Cache as mentioned in this post - https://community.m5stack.com/topic/5714/uart-remain-cache-ui-flow-2-equivalent
-
Hello @kumsat
hmm, not sure what's going on then. Unfortunately I do not have the RS232F Module 13.2 so I cannot try it myself.
Maybe it's time to reach out to M5Stack support?
Thanks
Felix