Search found 16 matches

by rmdMoba
Sat Jun 03, 2017 10:07 am
Forum: Problems with libraries
Topic: EEPROM fails after writing 255 times
Replies: 11
Views: 458

Re: EEPROM fails after writing 255 times

I am using the stm32duino bootloader, so I guess that would start at address 0x08000000? I never used that bootloader, but afaik the code starts directly after the bootloader. When I try to write to continous number of pages above page 100 in a bigger sketch, I fail writing to some pages. I don't r...
by rmdMoba
Fri Jun 02, 2017 8:37 pm
Forum: Problems with libraries
Topic: EEPROM fails after writing 255 times
Replies: 11
Views: 458

Re: EEPROM fails after writing 255 times

Is the main program really scattered all over the memory pages? I don't think so. When I use the integrated serial bootloader, it tells me which adresses it writes to. And this is a contiguous block from the beginning of the flash. Wrote address 0x08000100 (0.82%) Wrote address 0x08000200 (1.63%) W...
by rmdMoba
Fri Jun 02, 2017 4:28 pm
Forum: Problems with libraries
Topic: EEPROM fails after writing 255 times
Replies: 11
Views: 458

Re: EEPROM fails after writing 255 times

If you have a page size of 0x400, that means 1kbyte or 256 32bit-words. Each 32bit-word emulates ONE EEPROM-Cell and contains a 16bit address and 16 bit data. One word is reserved for management purposes, so you can store 255 values.
Regards, Franz
by rmdMoba
Fri May 26, 2017 12:26 pm
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

edogaldo wrote:A question as I'm not that expert with timers: can't we have any valid combination (also in a possible future variant) in which 2 pins can map to the same couple {timer, channel}?
No, that's not possible.
by rmdMoba
Sat May 20, 2017 2:39 pm
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

After several tests I did not find a reason why pwm doesn't work again after SPI has been active. The only solution I found is to remap the SPI pins ( or execute a hardware reset ). It seems that SPI blocks the AF on this pin if it once has been activated. Even setting all SPI registers back to '0' ...
by rmdMoba
Fri May 19, 2017 9:42 pm
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

Did you check if the end() method for the SPI port disables the SPI peripheral? It seems to do so ... void SPIClass::end(void) { if (!spi_is_enabled(_currentSetting->spi_d)) { return; } // Follows RM0008's sequence for disabling a SPI in master/slave // full duplex mode. while (spi_is_rx_nonempty(_...
by rmdMoba
Fri May 19, 2017 9:36 pm
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

victor_pv wrote: or you were using the normal ones, then if you switch to the alternate ones for SPI1 then PWM works again?
That's it
by rmdMoba
Fri May 19, 2017 9:21 pm
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

I confirmed it, does not enable the timer device, only the channel. That's true, but it's not the problem. Activating SPI also disables only the channel. The timer itself is still running. This is essential, because there are other channels where pwm may be active on non SPI pins. The problem is ob...
by rmdMoba
Fri May 19, 2017 7:14 am
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

So you will need to enable the timer device again. Yes, sure. But that is what pinMode( test1P, PWM ); // The following PWM sequence doesn't work should do. After a reset the timer is disabled too, and pinMode() sets it accordingly to create PWM pulses. Why does this not work when SPI disabled the ...
by rmdMoba
Thu May 18, 2017 9:01 pm
Forum: Cores
Topic: [Libmaple] pinMode() disables timer even if no PWM mode involved
Replies: 35
Views: 1311

Re: pinMode() disables timer even if no PWM mode involved

I checked the output on PA7 with a scope: // Test PWM on maplemini pin 4 / PA7 ( general Output / SPI and PWM ) #include <SPI.h> const byte Led1P = 16; // Led active during PWM Output const byte test1P = 4; // = port A7 ( SPI1-MOSI or TIM3 Ch2 ) SPIClass mySPI(1); void setup() { // put your setup co...