what would you expect

Post your cool example code here.
Post Reply
zmemw16
Posts: 1491
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

what would you expect

Post by zmemw16 » Thu Aug 04, 2016 12:16 am

debian 8 with arduino 1.6.9r0 and arduino_stm32 devel as of 250616 13:26, hardware is one of these
SAM_0005.png
SAM_0005.png (104.79 KiB) Viewed 444 times
stm32f103c8 - not too bad for use on a breadboard at £3 approx

ftdi usb/serial 3v3 on uart1 ( yellow blob bottom mid left) and a real ST stlink on the jtag( far left black blob), psu is 7.5v to a bread board psu (out of shot).
boot0 / boot1 both 0,
don't ask about the pic, can't find my samsung, was going to use the htc - just lost that inside arms reach, rather old digital camera as last resort and that's not even seen at all on usb.

sketch is

Code: Select all

void setup() {
  Serial.begin(115200);
  Serial1.begin(115200);
  pinMode(PC13, OUTPUT);
}

void loop() {
    Serial.print("0\t");
    Serial.println(millis());
    Serial1.print("1\t");
    Serial1.println(millis());
  digitalWrite(PC13, HIGH);
  delay(500);              // wait for a second
  digitalWrite(PC13, LOW);
  delay(100);              // wait for a second
}
i get nothing from ttyACMx, blank screen
i get '1 tab millis value incrementing by 600' etc from ttyUSB0

board is set 103c8, upload is stlink

am i missing something or not understanding something?
i was expecting 0 tab vale on ttyACMx and as above on ttyUSB0

stephen

User avatar
RogerClark
Posts: 7489
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: what would you expect

Post by RogerClark » Thu Aug 04, 2016 4:15 am

I think STLink enables USB Serial, but you'd need to double check that and also check if your board is appearing as that device

I don't recognize that hardware and its possible its missing the necessary 1.5k pullup on one of the USB pins

zmemw16
Posts: 1491
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: what would you expect

Post by zmemw16 » Thu Aug 04, 2016 9:40 am

2 off 200R and a 4k7 adjacent to usb skt / tracks
will adjust.
i recall 10k for the BP, don't think i've seen a 4k7 before

stephen

User avatar
RogerClark
Posts: 7489
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: what would you expect

Post by RogerClark » Thu Aug 04, 2016 9:46 am

I think the USB spec says 1.5k pullup.

Some boards have 4.7k and it works for some people, but I think 1.5k pullup on the USB is more reliable and more technically correct

zmemw16
Posts: 1491
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: what would you expect

Post by zmemw16 » Thu Aug 04, 2016 11:10 am

the correcting value is 2k2 btw :D
IMG_19800111_111302.png
IMG_19800111_111302.png (54.35 KiB) Viewed 430 times
found the htc, bit better picture

srp

Post Reply