Search found 89 matches

by chuckbook
Mon Jun 17, 2019 5:58 pm
Forum: Pyboard D-series
Topic: Using Timers on Pyboard 'D'.
Replies: 3
Views: 101

Re: Using Timers on Pyboard 'D'.

I didn't check in detail, but it looks like the callback method runs inside the interrupt service routine. This should be avoided because of several restrictions that apply to IRQ handlers. One of these restrictions is a locked heap within IRQ handlers. To circumvent this, the IRQ service routine ma...
by chuckbook
Thu May 23, 2019 8:32 am
Forum: Other Boards
Topic: [Any STM32 board] How much time this loop should take ?
Replies: 14
Views: 368

Re: [Any STM32 board] How much time this loop should take ?

The loop of the asm example takes 4 cycles.
This will result in 4e7 cycles (with 10e7 passes).
At 84 MHz I would expect ~476 ms.
by chuckbook
Wed May 22, 2019 7:57 pm
Forum: Pyboard D-series
Topic: i2c woe on pyboard d
Replies: 8
Views: 330

Re: i2c woe on pyboard d

I'm pretty sure there are 4 I2C interfaces on the F767! However, only two of them might be assigned to X & Y interfaces within of-the-shelf MPY binaries. I rarely use the default binaries and I have to admit that we are using our own board configurations where we define all the required interfaces a...
by chuckbook
Fri May 17, 2019 8:15 pm
Forum: Pyboard D-series
Topic: i2c woe on pyboard d
Replies: 8
Views: 330

Re: i2c woe on pyboard d

Hi Nicholas, agreed that the pyb/machine duality is sometimes pretty confusing. But there are good reasons to have them both. In short, pyb is only valid for stm32 MCUs, whereas machine tries to be manufacturer agnostic. Regarding I2C this means that the driver has to cover many different architectu...
by chuckbook
Wed Apr 17, 2019 2:47 pm
Forum: General Discussion and Questions
Topic: Anybody know how to make stdin non-blocking?
Replies: 4
Views: 186

Re: Anybody know how to make stdin non-blocking?

I thought so. But I agree, having some of the termios features on MPY's stdin would be nice.
So far we are using pyb.USB_VCP() to do things like USB to UART converters on pyboards.
by chuckbook
Wed Apr 17, 2019 8:48 am
Forum: General Discussion and Questions
Topic: Anybody know how to make stdin non-blocking?
Replies: 4
Views: 186

Re: Anybody know how to make stdin non-blocking?

Hi Dave,
I'm not quite sure I understood your problem but we always use termios with c_lflags ICANON == off and parameters:

Code: Select all

c_cc[VMIN] = 0
c_cc[VTIME] = 0
That makes perfect polling read.
by chuckbook
Sun Apr 07, 2019 10:15 am
Forum: Pyboard D-series
Topic: Unresponsive pyboard: how to tell if it's dead?
Replies: 6
Views: 411

Re: Unresponsive pyboard: how to tell if it's dead?

You can safely power a PYBD from VIN with a voltage from 3.3V to 4.8V. Don't use any voltage above 4.8V if your board has a wireless module installed. If you would like to power from a 5V power supply I recommend to use a 1A silicon diode in series with the 5V power line.
by chuckbook
Sat Apr 06, 2019 3:09 pm
Forum: Pyboard D-series
Topic: Unresponsive pyboard: how to tell if it's dead?
Replies: 6
Views: 411

Re: Unresponsive pyboard: how to tell if it's dead?

Note that there is a fuse in the USB-HS power path. If by any chance more than 1 A is drawn from the USB host, this would trip the fuse immediately. If a regular USB host port is used, the over current limit of a USB port will kick in at 500 mA leaving the PYBD fuse intact. However, recent USB host ...
by chuckbook
Sat Apr 06, 2019 7:40 am
Forum: Pyboard D-series
Topic: Problem connecting after power cycle
Replies: 9
Views: 337

Re: Problem connecting after power cycle

I repeated the test with longer timeouts. Same result. However, when I selected a much weaker AP (-74dB) I got failures to connect after power-cycling. I modified your code to do a soft reboot after timeout and the second attempt always succeeded. I have a rough guess what could cause this problem (...
by chuckbook
Fri Apr 05, 2019 5:20 pm
Forum: Pyboard D-series
Topic: Problem connecting after power cycle
Replies: 9
Views: 337

Re: Problem connecting after power cycle

Out of curiosity I tested your script with a SF6W but due to lack of a WBUS-DIP28 I had to use USB-HS. There wasn't a single failure with ~20 power cycles. It took ~7s to re-connect after a power cycle. I will try to get hold of a WBUS-DIP28 and repeat the test. PS: The AP I used was in the same roo...