In our implementation setClock assume the Wire is initialized.
And in the Arduino link:
https://www.arduino.cc/en/Reference/WireSetClock
There is no mention that Wire should be initialized before setClock.
I just noticed that a long way down in the comments for the video somebody does mention ...
Search found 12 matches
- Wed Apr 01, 2020 2:52 pm
- Forum: General discussion
- Topic: [SOLVED] BluePill I2C Wire.setClock(400000) Stops USB working
- Replies: 7
- Views: 7943
- Wed Apr 01, 2020 12:43 pm
- Forum: General discussion
- Topic: [SOLVED] BluePill I2C Wire.setClock(400000) Stops USB working
- Replies: 7
- Views: 7943
Re: BluePill I2C Wire.setClock(400000) Stops USB working
OK , thanks that worked.
I followed this video which states that the Setclock() should be called before the wire.begin otherwise the I2c will run at the default speed.
Look at 4 minutes 30.
https://www.youtube.com/watch?v=ImctYI8hgq4
I also did do a lot of searching to find an example which ...
I followed this video which states that the Setclock() should be called before the wire.begin otherwise the I2c will run at the default speed.
Look at 4 minutes 30.
https://www.youtube.com/watch?v=ImctYI8hgq4
I also did do a lot of searching to find an example which ...
- Wed Apr 01, 2020 10:32 am
- Forum: General discussion
- Topic: [SOLVED] BluePill I2C Wire.setClock(400000) Stops USB working
- Replies: 7
- Views: 7943
Re: BluePill I2C Wire.setClock(400000) Stops USB working
I am using Visual Micro.
Annotation 2020-04-01 112459.jpg
Even setting "Wire.setClock(100000);" stops USB and I get a windows message "USB Device not recognised etc", and the LED does not blink.
The programme seems to compiles and uploads OK.
As you can see I have remmed out most things ...
Annotation 2020-04-01 112459.jpg
Even setting "Wire.setClock(100000);" stops USB and I get a windows message "USB Device not recognised etc", and the LED does not blink.
The programme seems to compiles and uploads OK.
As you can see I have remmed out most things ...
- Wed Apr 01, 2020 8:38 am
- Forum: General discussion
- Topic: [SOLVED] BluePill I2C Wire.setClock(400000) Stops USB working
- Replies: 7
- Views: 7943
[SOLVED] BluePill I2C Wire.setClock(400000) Stops USB working
On my BluePill programme, using I2C , when I include the line "Wire.setClock(400000);" the USB port, which was working before, Stops working.
The I2C was working before as well.
I have "wire version=1.0" installed.
Any suggestions please.
The I2C was working before as well.
I have "wire version=1.0" installed.
Any suggestions please.
- Thu Mar 26, 2020 7:05 pm
- Forum: General discussion
- Topic: [SOLVED]BluePill F1038C8 Where has all the memory gone
- Replies: 9
- Views: 9525
Re: [SOLVED]BluePill F1038C8 Where has all the memory gone
For my project I want to use the things excluded by hal_conf_extra.h
So without hal_conf_extra.h and enabling Serial and USB I get:
Sketch uses 19524 bytes (29%) of program storage space. Maximum is 65536 bytes.
Global variables use 3548 bytes (17%) of dynamic memory, leaving 16932 bytes for local ...
So without hal_conf_extra.h and enabling Serial and USB I get:
Sketch uses 19524 bytes (29%) of program storage space. Maximum is 65536 bytes.
Global variables use 3548 bytes (17%) of dynamic memory, leaving 16932 bytes for local ...
- Thu Mar 26, 2020 5:54 pm
- Forum: General discussion
- Topic: [SOLVED]BluePill F1038C8 Where has all the memory gone
- Replies: 9
- Views: 9525
Re: [SOLVED]BluePill F1038C8 Where has all the memory gone
If I leave that line I get the following errors and just assumed it was that line causing it because it.
In file included from C:\Users\james\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/board.h:8,
from C:\Users\james\AppData\Local\Arduino15\packages\STM32\hardware ...
In file included from C:\Users\james\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.8.0\cores\arduino/board.h:8,
from C:\Users\james\AppData\Local\Arduino15\packages\STM32\hardware ...
- Thu Mar 26, 2020 5:49 pm
- Forum: General discussion
- Topic: [Solved]How to use USB micro port on BluePill
- Replies: 11
- Views: 24738
Re: How to use USB micro port on BluePill
OK I think I have sorted this out.
BP is known to have an issue with a wrong resistor value for USB detection so it can't enumerate properly.
"USB Enumeration is the process of detecting, identifying and loading drivers for a USB device". I replaced resistor R10 on the underside of the BluePill ...
BP is known to have an issue with a wrong resistor value for USB detection so it can't enumerate properly.
"USB Enumeration is the process of detecting, identifying and loading drivers for a USB device". I replaced resistor R10 on the underside of the BluePill ...
- Thu Mar 26, 2020 5:33 pm
- Forum: General discussion
- Topic: [SOLVED]BluePill F1038C8 Where has all the memory gone
- Replies: 9
- Views: 9525
Re: [SOLVED]BluePill F1038C8 Where has all the memory gone
Just as follow up information:
I built the Blink programme in Arduino for BluePill, disabling the USART and USB support:
Sketch uses 7429 bytes (11%) of program storage space.
Global variables use 576 bytes (2%) of dynamic memory
Then in "Arduino - Sketch - Add file" I added the hal_conf_extra.h ...
I built the Blink programme in Arduino for BluePill, disabling the USART and USB support:
Sketch uses 7429 bytes (11%) of program storage space.
Global variables use 576 bytes (2%) of dynamic memory
Then in "Arduino - Sketch - Add file" I added the hal_conf_extra.h ...
- Wed Mar 25, 2020 3:31 pm
- Forum: General discussion
- Topic: [Solved]How to use USB micro port on BluePill
- Replies: 11
- Views: 24738
Re: How to use USB micro port on BluePill
Hi fpiSTM, Still not working, the only difference to what you suggest is that I am not using a bootloader as in your example, I am using STM32CubeProgrammer v2.3.0 with a Chinese ST-LINK.
I am using CoolTerm but cannot see a USB port other than the ST-LINK.
This is my programme:
void setup ...
I am using CoolTerm but cannot see a USB port other than the ST-LINK.
This is my programme:
void setup ...
- Wed Mar 25, 2020 10:33 am
- Forum: General discussion
- Topic: [Solved]How to use USB micro port on BluePill
- Replies: 11
- Views: 24738
[Solved]How to use USB micro port on BluePill
Advice please for a BluePill beginner.
I am programming with an ST-LINK.
How do I setup and use the micro USB port on the BluPill board to output data from my programme?
There are 2 optional settings in the Arduino Tools section, USB support and USB speed.
I am not sure how to set these.
Then in the ...
I am programming with an ST-LINK.
How do I setup and use the micro USB port on the BluPill board to output data from my programme?
There are 2 optional settings in the Arduino Tools section, USB support and USB speed.
I am not sure how to set these.
Then in the ...