Search found 115 matches

by mebab
Wed Oct 27, 2021 2:16 pm
Forum: General discussion
Topic: Changing hardware
Replies: 7
Views: 3138

Re: Changing hardware

In STM32L476 that works fine, I use SPI1: PA5: CK PA6: MISO PA7: MOSI PB5: CS of SD card In STM32L433 that doesn't work fine, I use the same pins in SPI1: PA5: CK PA6: MISO PA7: MOSI PA3: CS of SD card A simple code for writing on SD card is in the following where Initialization fails on SD.begin : ...
by mebab
Wed Oct 27, 2021 1:13 pm
Forum: General discussion
Topic: Changing hardware
Replies: 7
Views: 3138

Re: Changing hardware

Thanks ag123 and mrburnette I tried to write on an SD card. However, I get the same problem. For SD card, it gets stuck in the following code: if (!SD.begin(PA3)) { Serial.println("initialization failed!"); } Regardless of the type of SPI device, I am sure that SPI1 (PA5..PA7) that I use i...
by mebab
Tue Oct 26, 2021 1:36 pm
Forum: General discussion
Topic: Changing hardware
Replies: 7
Views: 3138

Changing hardware

Hi I have changed my hardware from STM32L476 to STM32L433 and the connections to SPI devices have been tested which are all correct. The new pin numbers have been correctly set. The same program works on STM32L476 but not on STM32L433. I use Arduino IDE to program the hardware. It looks like either ...
by mebab
Wed Oct 06, 2021 8:56 pm
Forum: General discussion
Topic: To change Pin tasks
Replies: 1
Views: 1109

To change Pin tasks

Maybe the following question looks like a very basic hardware issue but I would need your comments to ensure: Question : Is it possible to swap pin a task for instance from MISO to MOSI in STM32 via the relevant variant ( .cpp file)? As I see in Cube MX IDE, every pin can only be designated for a fe...
by mebab
Thu Sep 23, 2021 2:53 pm
Forum: General discussion
Topic: Appropriate low-power mode for timing applications
Replies: 17
Views: 7714

Re: Appropriate low-power mode for timing applications

Yes. I know this. In fact, I have some extra reserve time at the end of the loop to take care of this.

Thanks for your kind help fpiSTM!
by mebab
Thu Sep 23, 2021 2:27 pm
Forum: General discussion
Topic: Appropriate low-power mode for timing applications
Replies: 17
Views: 7714

Re: Appropriate low-power mode for timing applications

Thank you all for the valuable comments! I will consider using the external RTC later when my hardware is ready for the test which may take some time.
by mebab
Thu Sep 23, 2021 11:44 am
Forum: General discussion
Topic: Appropriate low-power mode for timing applications
Replies: 17
Views: 7714

Re: Appropriate low-power mode for timing applications

Well, one way though, for timing critical apps, a hardware timer gives the best precision and predictability. That may be useful for timing sensitive apps such as interfacing a sensor over comms etc. But it would cost some power. And I'm not too sure how that works in deep sleep etc, my guess is th...
by mebab
Thu Sep 23, 2021 11:28 am
Forum: General discussion
Topic: Appropriate low-power mode for timing applications
Replies: 17
Views: 7714

Re: Appropriate low-power mode for timing applications

Thanks fpiSTM. The part of the code under discussion is in the following: uint32_t ss = millis() - T_Beginx; // SS is the total operating time of different tasks from the beginning of the main loop uint32_t ww=0; if (T_Loop>ss) ww = T_Loop-ss; // We check if there is an extra time left for energy sa...
by mebab
Thu Sep 23, 2021 7:33 am
Forum: General discussion
Topic: Appropriate low-power mode for timing applications
Replies: 17
Views: 7714

Re: Appropriate low-power mode for timing applications

More details in the following: 1. I do everything to lower power consumption in my working application. 2. I use the internal RTC of STM32 to activate a software interrupt, to read few sensors every 10 ms within a main loop (fixed in 10 sec). 3. The total time of the whole operation in the loop vari...
by mebab
Wed Sep 22, 2021 4:09 pm
Forum: General discussion
Topic: Appropriate low-power mode for timing applications
Replies: 17
Views: 7714

Re: Appropriate low-power mode for timing applications

Thanks ag123. Yes, I have already implemented the sleep mode and the way we deactivate unnecessary clocks and they helped a lot to lower power consumption. Agree with you about the deep sleep mode. I think the deep sleep mode may work fine in many applications which mainly are not exactly fixed-time...

Go to advanced search