Search found 1681 matches

by victor_pv
Sat Nov 18, 2017 2:33 pm
Forum: New users MUST post here first, and let us know a bit about you and your projects
Topic: Long time reader , first time posting
Replies: 6
Views: 73

Re: Long time reader , first time posting

The first post in that therad is exactly the implementation of the complementary PWM. You should be able to use it, as long as you use the libmaple based core. If you use the offical STM one, then look at what the libmaple core does, and write the code to do the exact same with the STM HAL functions...
by victor_pv
Sat Nov 18, 2017 2:21 pm
Forum: General discussion
Topic: Select the SPI bus within a function
Replies: 3
Views: 50

Re: Select the SPI bus within a function

You could try using a pointer to SPI instead, then the pointer can be changed in a function to one port or the other. Within your code you will likely have to change all spi.transfer etc to spi->tranfer (so -> rather than .) Example: Original spi.transfer(xx,nn); New: SPIClass *spi_pointer = &SPI; ....
by victor_pv
Fri Nov 17, 2017 1:04 pm
Forum: PR's bugs and enhancements
Topic: PR to remove compile warnings buy adding __attribute__((unused))
Replies: 3
Views: 74

Re: PR to remove compile warnings buy adding __attribute__((unused))

My vote goes like this: For functions that have been like that forever in the core, there is no gain by changing their parameters, and much to lose as it can break code, so I would just add unused to those. Those parameters have not been used in years, and no one missed them, lets just ignore them w...
by victor_pv
Thu Nov 16, 2017 6:12 pm
Forum: General discussion
Topic: I2C freezes the STM
Replies: 8
Views: 191

Re: I2C freezes the STM

The libmaple hardwire implementation can freeze on certain conditions, I have seen it too. I was using a memory without the pull up resistors (didn't notice they were missing), and it would work fine some times, but freeze others. As Racemaniac pointed out, the problem is in the handling of error co...
by victor_pv
Thu Nov 16, 2017 6:07 pm
Forum: Code snipplets
Topic: EEPROM emulator for 8-bit data
Replies: 8
Views: 118

Re: EEPROM emulator for 8-bit data

In other words, 0xFFFE -> 0x0000 is OK, but 0xFFFE -> 0xFFF0 is not. The core EEPROM.cpp code works because it's only changing 0xEEEE -> 0x0000. If the code tried to change 0xEEEE to any non-zero value, it would presumably fail. In theory, I could optimize my EEPROM8 code for the special case where...
by victor_pv
Thu Nov 16, 2017 1:45 pm
Forum: Code snipplets
Topic: EEPROM emulator for 8-bit data
Replies: 8
Views: 118

Re: EEPROM emulator for 8-bit data

However, it sounds like the STM Flash logic does something even to the freshly erased logic 1 bits, that makes them into a different sort of 1 that cant be changed to a 0. ???? I had to recheck the EEPROM emulation library, but it relies in doing that, writting 0 in some bits in words that were wri...
by victor_pv
Thu Nov 16, 2017 6:11 am
Forum: Code snipplets
Topic: EEPROM emulator for 8-bit data
Replies: 8
Views: 118

Re: EEPROM emulator for 8-bit data

The limitation on not being able to set 1's in a single word after 0s are written is not on the stm32 flash code, but rather flash memory architecture, so no way around that. About the 16bit writes, is again a silicon limitation in the STM32 flash, the hardware works that way, so again the code can ...
by victor_pv
Tue Nov 14, 2017 11:33 pm
Forum: Projects
Topic: BluePill breakout boards
Replies: 15
Views: 536

Re: BluePill breakout boards

Roger I'm designing a toaster/reflow controller around a bluepill. It's working now with cables running around, so I want to design a custom board to plug it all. Did you post your bluepill kicad model somewhere? I saw the attached file in one of the first posts, not sure if that's the latest you ha...
by victor_pv
Mon Nov 13, 2017 8:32 pm
Forum: General discussion
Topic: some sectors are write protected
Replies: 24
Views: 310

Re: some sectors are write protected

Also take a screenshot of your option Bytes screen.
by victor_pv
Mon Nov 13, 2017 8:30 pm
Forum: STM32F103 Boards
Topic: Complete list of pins for external attachInterrupt()?
Replies: 4
Views: 123

Re: Complete list of pins for external attachInterrupt()?

ALL gpio pins can be used for EXTI. There are 16 EXTI lines, and they go to the corresponding pin 0 to 15 to each GPIO. Since each line is shared for all corresponding pin of all GPIO ports, only 1 of them can be enabled a time. Example PA0, PB0, PC0... share EXTI0. Only 1 can be enabled for EXTI. I...