Forum Replies Created
-
AuthorPosts
-
7 November 2023 at 17:28 in reply to: MicroPython I2C PCF8591 round value problem Raspberry Pi Pico #28044
Hi jiangzhiyu233,
I executed your code and I replicated the issue. It seems that there are some problems when writing and reading at the same time.
I do a little fix, try It, and give me feedback.
Thanks Renzo6 November 2023 at 10:03 in reply to: MicroPython I2C PCF8591 round value problem Raspberry Pi Pico #28033Hi jiangzhiyu233,
I retry the code and I don’t have that behavior, do you use the example provided in github??
Bye RenzoHi Nezha,
your problem. It’s very strange.
I think you can try to use a “first choice” SPI2 and “second choice” in coherence, like so:PB15
PB14
PB10and
PC3
PC2
PB13After that test, you can try the official STMicroelectronics core to check if STM32duino.
Bye Renzo
Hi Nezha,
I write a little article about that and when I do the test, I follow the pinout I retrieve from the STMicroelectronic core code.I check your pin selection, and it seems to be ok.
#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PA_12, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_5_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; #endif #ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PA_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_4_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; #endif #ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SCLK[] = { {PA_1, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_3_ALT1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; #endif
The SS isn’t so important but if you can try the default also
// SPI definitions #ifndef PIN_SPI_SS #define PIN_SPI_SS PA4 #endif #ifndef PIN_SPI_SS1 #define PIN_SPI_SS1 PA15 #endif #ifndef PIN_SPI_SS2 #define PIN_SPI_SS2 PB0 #endif #ifndef PIN_SPI_SS3 #define PIN_SPI_SS3 PNUM_NOT_DEFINED #endif #ifndef PIN_SPI_MOSI #define PIN_SPI_MOSI PA7 #endif #ifndef PIN_SPI_MISO #define PIN_SPI_MISO PA6 #endif #ifndef PIN_SPI_SCK #define PIN_SPI_SCK PA1 #endif
In the code, you begin two times the spi interface, and I think It can generate some problems.
Try to use a configuration declaration like this// SD card attached to the secondary SPI as follows: // SS = PB2; // MOSI = PC3; // MISO = PB15; // SCK = PB10; #define SD_CS_PIN PB12 static SPIClass mySPI2(PC2, PC3, PB10, SD_CS_PIN); #define SD2_CONFIG SdSpiConfig(SD_CS_PIN, DEDICATED_SPI, SD_SCK_MHZ(18), &mySPI2)
then only one begin.
// we'll use the initialization code from the utility libraries // since we're just testing if the card is working! if (!SD.begin(SD2_CONFIG)) { // if (!SD.begin(SD_CS_PIN)) { Serial.println("initialization failed. Things to check:"); Serial.println("* is a card inserted?"); Serial.println("* is your wiring correct?"); Serial.println("* did you change the chipSelect pin to match your shield or module?"); while (1); } else { Serial.println("Wiring is correct and a card is present."); }
But check the STM32duino core can change the pin.
Try to use also the example I wrote and tested for the Arduino environment.
How to use SD card with stm32 and SdFat library
Bye Renzo
Thanks Mark,
I fixed It.
Thanks again RenzoHi,
I share It on PCBWay, not directly Gerber but you can order from PCBWay at the cost of the PCB.
Bye RenzoIn the master, you have a Relay with 3 exit
NO (Normally open) – COM (Input) – NC (Normally close)
if you put in COM 100v you can use NO e NC to activate an external SSR.I think It’s your need.
Hi John,
In my farm I using a small pump with high prevalence (70m),
and it work without problem with the 200w panel I add a charging regulator to send 12v-like specs
The flow is less than the home water tap, but on a sunny day, fill the 1000l tank.
If you follow the indication of the Tank project, you can connect the Master that have two voltage regulator and a batter input connector that can be powered directly from 12v.
The client has the panel input and a voltage regulator with a rechargeable lithium battery and after it functions It goes into deep sleep.
This system I think can cover your expectations.
Bye Renzo
27 October 2023 at 10:25 in reply to: Error while compiling Wio_terminal_SdFat code in Arduino IDE #27922Hi DR-DNK,
I check the library and it works for me. Try to check your environment.
Bye RenzoHi gjb,
I wrote a paragraph on how to get RSSI here.
Bye RenzoHi rs77can,
I think there is the possibility that the webserver and email need a good quantity of RAM.
What are the specs of the MCU you use?
Bye Renzo17 October 2023 at 18:34 in reply to: Error compiling Wio_terminal_SdFat code in Arduino IDE. #27877Hi,
I retest SdFat2 and standard SD, and works correctly.
Check if you have some issues in the importing library at compile time.
Bye Renzo29 September 2023 at 09:27 in reply to: BeePrint and MKS WiFi Firmware releases with ChangeLog #27660Hi Jon,
I think that there is no response from the firmware, probably the management is different and It can’t work.
Bye Renzo22 September 2023 at 17:01 in reply to: EByte LoRa Communication encode/decode, crypt/decrypt #27551Hi Edge,
with some limitation, you can transmit the message, but you must decrypt It I think work only transparent transmission.not a good idea for a production solution.
Bye Renzo-
This reply was modified 1 year, 11 months ago by
Renzo Mischianti.
22 September 2023 at 15:34 in reply to: BeePrint and MKS WiFi Firmware releases with ChangeLog #27550Hi jon,
you can check on your browser developer tools and go to WS –> Messages and check if the information arrives from the device.
Bye Renzo -
This reply was modified 1 year, 11 months ago by
-
AuthorPosts