Search found 146 matches
- Sun Jan 30, 2022 4:50 am
- Forum: General discussion
- Topic: Writing to inputs...
- Replies: 4
- Views: 4394
Re: Writing to inputs...
Now I see what you mean (maybe). I would take an "input pin" as being one that has MODEy[1:0] = 00 in CRL/CRH, which results in the ODR content not being driven to the pin. So in that sense you cannot usefully "write to an input pin". However if MODEy[1:0] = non-zero (which you c...
- Sat Jan 29, 2022 6:36 am
- Forum: General discussion
- Topic: Writing to inputs...
- Replies: 4
- Views: 4394
Re: Writing to inputs...
I'll take your word for the difference in 5v tolerance between SPI1 and SPI2, as I did not check. So, you are proposing to duplicate the incoming signal on an available/unused 5V tolerant pin, on another pin which is available/unused? If you externally connected the output pin of that to the SPI inp...
- Thu Dec 23, 2021 7:44 pm
- Forum: General discussion
- Topic: only 50% of program gets compiled!!!!
- Replies: 10
- Views: 6499
Re: only 50% of program gets compiled!!!!
I'm a bit confused as to how you know only 50% of your code got compiled. Maybe the "Sketch uses xxxxx bytes" message shows only half the size you expect it to be? Or you looked at the link map? Something else besides the program only works partially? As for suggested causes, if I delibera...
- Wed Nov 24, 2021 9:40 am
- Forum: General discussion
- Topic: Serial comunication beetwen Arduino and STM32 F401RE with Arduino ide
- Replies: 4
- Views: 2692
Re: Serial comunication beetwen Arduino and STM32 F401RE with Arduino ide
How have you wired things up? You seem to expect the Serial.read() on the F401 to read what came from the Arduino, but that Serial.print on the F401 will print the result so that you can see what was received. Besides that, the Serial.print(valueTX) on the Arduino will convert valueTX to a character...
- Wed Mar 17, 2021 7:27 pm
- Forum: General discussion
- Topic: postbag topics
- Replies: 21
- Views: 9622
Re: postbag topics
for my postbag, i've kind of 'swtched to' stm32f401cc in place of the old blue pil et.a. I have what is probably a lifetime supply of F103 blue and black pills. That is not saying much really, as so far in my lifetime I've only used about 1.5 of them. Truth be known, for the sort of things I do, lo...
- Tue Mar 16, 2021 2:48 am
- Forum: General discussion
- Topic: PlatformIO and Arduino IDE compilation results are different
- Replies: 24
- Views: 13641
Re: PlatformIO and Arduino IDE compilation results are different
Edit: I've got a feeling I must have messed something up. Sounds too good (fast) to be true. I had a chance to look at this again. I don't know exactly how, but I think the compiler was somehow thwarting my attempt to measure the timing. So, that was indeed too good to be true. Now I measured the t...
- Fri Mar 12, 2021 1:02 am
- Forum: General discussion
- Topic: PlatformIO and Arduino IDE compilation results are different
- Replies: 24
- Views: 13641
Re: PlatformIO and Arduino IDE compilation results are different
On F103 (blue pill) I've timed it at about 0.055us (18M times / s). I tried using DWT->CYCCNT instead of micros(). That tells me that on the 72MHz F303, digitalReadFast(digitalPinToPinName(PB10)) takes around 215ns, while digitalReadFast(PB_10) was only 35ns (compiled with -O3). To misquote somebod...
- Thu Mar 11, 2021 11:03 am
- Forum: General discussion
- Topic: PlatformIO and Arduino IDE compilation results are different
- Replies: 24
- Views: 13641
Re: PlatformIO and Arduino IDE compilation results are different
If you really wanted to print the result of the digitalReadFast(), but exclude the time taken for the Serial.print() from your measurement, then you could assign the return value from digitalReadFast() to an int variable, and then print that together with the timecnt value. Based on the code I saw g...
- Thu Mar 11, 2021 6:37 am
- Forum: General discussion
- Topic: PlatformIO and Arduino IDE compilation results are different
- Replies: 24
- Views: 13641
- Thu Mar 11, 2021 6:30 am
- Forum: General discussion
- Topic: PlatformIO and Arduino IDE compilation results are different
- Replies: 24
- Views: 13641
Re: PlatformIO and Arduino IDE compilation results are different
I looked at what the compiler does for statements like these: if ( GPIOB->IDR & 1 << 10 ) ...; if ( GPIOB->IDR >> 10 & 1 ) ...; I thought that potentially the first of those might execute a tad faster than the second, but no, it turns out the compiler is smart enough to generate exactly the ...