Search found 95 matches

by fredbox
Mon Sep 11, 2017 4:04 pm
Forum: General discussion
Topic: [POLL (Open)] Blocking behaviour of Serial.USB during TX
Replies: 21
Views: 548

Re: [POLL (Open)] Blocking behaviour of Serial.USB during TX

-If USB is disconnected, just drop and return with no timeout, and not saving to buffer either. Return indicates 0 bytes were sent. This is how Arduino DUE works.
+1
by fredbox
Thu Aug 17, 2017 3:06 pm
Forum: Off topic
Topic: Aliexpress delivery times
Replies: 12
Views: 375

Re: Aliexpress delivery times

Prior to joining this forum, I had never ordered anything from AliExpress. Since June of last year, I have ordered from about 70 different sellers. Every item has been delivered. Only a couple were after the promised delivery date. In one case, the seller issued a small refund that I didn't request....
by fredbox
Wed Aug 02, 2017 5:24 pm
Forum: STM32F103 Boards
Topic: Black STM32F103 board from aliexpress with different pcb layout
Replies: 15
Views: 720

Re: Black STM32F103 board from aliexpress with different pcb layout

If the bootloader is running, you should see the led blinking. Did you remember to move the jumper on Boot0 back to 0? Boot0 and Boot1 should both be 0 to use the bootloader.
by fredbox
Wed Aug 02, 2017 4:12 pm
Forum: STM32F103 Boards
Topic: Black STM32F103 board from aliexpress with different pcb layout
Replies: 15
Views: 720

Re: Black STM32F103 board from aliexpress with different pcb layout

You may need a different USB serial adapter. My CH340 board was getting similar errors, but the CP2102 I have found and flashed it the first time. Make sure Boot0=1 and Boot1=0 before you try to upload the bootloader. There was/is an issue with some serial drivers not supporting parity. The Black Pi...
by fredbox
Sat Jul 22, 2017 5:01 pm
Forum: Builds and Announcements
Topic: Combined bootloader and sketch
Replies: 7
Views: 409

Re: Combined bootloader and sketch

Change line 18 to

Code: Select all

printf("\nUsage. %s bootloader.bin sketch.bin output.bin - Incorrect number of args\n\n", argv[0]);

$ ./main

Usage. ./main bootloader.bin sketch.bin output.bin - Incorrect number of args
That will allow usage to use the name of the executable program.
by fredbox
Sat Jul 22, 2017 2:45 pm
Forum: Builds and Announcements
Topic: Combined bootloader and sketch
Replies: 7
Views: 409

Re: Combined bootloader and sketch

The code compiles with no changes on Linux. For Windows, you can use tcc if Visual Studio is not installed. I use that quite a lot for Windows exe files. Linux: $ make main cc main.c -o main $ ls -la main* -rwxr-xr-x 1 fred fred 8930 Jul 22 09:12 main -rw-r--r-- 1 fred fred 2136 Jul 22 09:11 main.c ...
by fredbox
Wed Jul 12, 2017 12:38 am
Forum: STM Nucleo boards
Topic: Is OUTPUT_OPEN_DRAIN supported
Replies: 15
Views: 429

Re: Is OUTPUT_OPEN_DRAIN supported

const uint8_t led_pin = 33; uint8_t led = 0; void setup() { pinMode(led_pin, OUTPUT_OPEN_DRAIN); } void loop() { digitalWrite(led_pin, led); led = 1 - led; delay(500); } Sketch uses 12292 bytes (11%) of program storage space. Maximum is 110592 bytes. Global variables use 2560 bytes of dynamic memor...
by fredbox
Mon Jul 10, 2017 7:48 pm
Forum: STM32F103 Boards
Topic: [SOLVED] USB UNSPECIFIED
Replies: 2
Views: 219

Re: USB UNSPECIFIED

Did you install the bootloader? Your board won't be recognized until you program the bootloader into the board.
http://wiki.stm32duino.com/index.php?ti ... bootloader
by fredbox
Tue Jul 04, 2017 10:44 pm
Forum: Projects
Topic: RTC CLOCK on BLUE PILL with Four 7 segments
Replies: 16
Views: 1120

Re: RTC CLOCK on BLUE PILL with Four 7 segments

The easy way to get a small 4 digit 7-segment clock display is to use one of the TM1637 modules from Ali or eBay. Two data lines, power and ground, a small amount of code and you are good. These displays are simple enough that you can bit-bang without a library - see this example . If you need 8 dig...