Thanks gdenton61, that's embarassing - that error is in all of the 4 code examples that I put up.
In reality, it's not in the codes that I'm actually trying as the compiler rejects that error.
Ian
Search found 15 matches
- Sat Oct 31, 2020 9:26 am
- Forum: General discussion
- Topic: asm not working with C
- Replies: 2
- Views: 3848
- Fri Oct 30, 2020 3:37 pm
- Forum: General discussion
- Topic: asm not working with C
- Replies: 2
- Views: 3848
asm not working with C
Hello again.
I’ve been trying to move forward with trying to measure the time interval between 2 pulses.
Having got the asm working (the one labelled “asm1” on:
https://www.stm32duino.com/viewtopic.php?f=7&t=704&start=21
I am now trying to integrate this into C code but whatever I try, the asm ...
I’ve been trying to move forward with trying to measure the time interval between 2 pulses.
Having got the asm working (the one labelled “asm1” on:
https://www.stm32duino.com/viewtopic.php?f=7&t=704&start=21
I am now trying to integrate this into C code but whatever I try, the asm ...
- Wed Oct 28, 2020 1:50 pm
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
And here is the code:
From GonzoG
// From https://www.stm32duino.com/viewtopic.php?f=7&t=704&p=4659#p4659 GonzoG IO_speed_test.zip
#define dWF(a,b) digitalWriteFast(digitalPinToPinName(a),b)
#define dRF(a) digitalReadFast(digitalPinToPinName(a))
// Modified to use PB3 for read and PB4 for ...
From GonzoG
// From https://www.stm32duino.com/viewtopic.php?f=7&t=704&p=4659#p4659 GonzoG IO_speed_test.zip
#define dWF(a,b) digitalWriteFast(digitalPinToPinName(a),b)
#define dRF(a) digitalReadFast(digitalPinToPinName(a))
// Modified to use PB3 for read and PB4 for ...
- Wed Oct 28, 2020 1:41 pm
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
OK, I decided that I should put the codes used up here and while knocking the grammar into shape I decided to move the Nano pulses a bit further apart….
It looks as if the ‘Early’ pulses were actually very late ones. Oops sorry.
It looks as if the ‘Early’ pulses were actually very late ones. Oops sorry.
- Wed Oct 28, 2020 12:00 pm
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
Well, I cracked it – sort of.
I spent the last week dissecting GonzoG’s code and watching it on the ‘scope. The two fast Read commands show the same waveform and time – about 55nS.
I also worked out how to do this in assembler – and got the same timings and waveform as GonzoG did with C!
I then ...
I spent the last week dissecting GonzoG’s code and watching it on the ‘scope. The two fast Read commands show the same waveform and time – about 55nS.
I also worked out how to do this in assembler – and got the same timings and waveform as GonzoG did with C!
I then ...
- Sun Oct 18, 2020 3:14 pm
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
Very despondent. I studied GonzoG's code until I understood what was going on, then, using his/her sketch and all the #defines etc I inserted my own code and watched it on a 'scope.
Same problem. digitalWriteFast works a dream producing a pulse train of about 18 pulses in a microsecond, suggesting ...
Same problem. digitalWriteFast works a dream producing a pulse train of about 18 pulses in a microsecond, suggesting ...
- Sat Oct 17, 2020 4:50 pm
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
That is fantastic GonzoG. It works and I agree with your timings (approximately).
Now I need to do some serious studying to see what is different between yours and mine.
Thanks again.
Ian
Now I need to do some serious studying to see what is different between yours and mine.
Thanks again.
Ian
- Sat Oct 17, 2020 11:02 am
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
Thanks again fpiSTM. That is a really clear and useful link. As far as I can tell the code given is understood by STM32CubeMX and not by Arduino IDE, is that right?
I have tried some of the code snippets given but they just get rejected by the IDE with error messages.
I am comfortable with ...
I have tried some of the code snippets given but they just get rejected by the IDE with error messages.
I am comfortable with ...
- Sat Oct 17, 2020 10:44 am
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
Thanks GonzoG. I just tried that - no change. Well - this time I got:
1.5uS to 4.1uS using Method A (digitalRead) and
1.0uS to 2.7uS using Method B (digitalReadFast)
so a little better than 500k reads/s the same as with optimization on "Smallest -Os (default)"
I jusrt re-tried the digitalWrite ...
1.5uS to 4.1uS using Method A (digitalRead) and
1.0uS to 2.7uS using Method B (digitalReadFast)
so a little better than 500k reads/s the same as with optimization on "Smallest -Os (default)"
I jusrt re-tried the digitalWrite ...
- Fri Oct 16, 2020 7:26 pm
- Forum: General discussion
- Topic: Blue Pill running slow
- Replies: 21
- Views: 16414
Re: Blue Pill running slow
Thanks fpiSTM, but I have no idea what you mean.
How would HAL, LL or CMSIS look if I used them in the Arduino IDE? Or would they only work in the STMCubeProgrammer?
Ian
How would HAL, LL or CMSIS look if I used them in the Arduino IDE? Or would they only work in the STMCubeProgrammer?
Ian