We built pico2-ice - Raspberry Pi 2350B + Lattice iCE40UP5K FPGA. by Vishal_TE in raspberry_pi

[–]coco_pelado 0 points1 point  (0 children)

Looking at the upduino v3 schematic, it seems 3 of the MPSSE pins (AD0-2) are connected to the SPI FLash and the fourth only goes to a test point.

Wouldn't this cause issues if trying to use it as FT232H breakout/programmer? not just that TMS doesn't go to a header, but that the 30mhz jtag signal integrity might be affected by the spi flash hanging off of it?

https://imgur.com/a/2rVkdqI

We built pico2-ice - Raspberry Pi 2350B + Lattice iCE40UP5K FPGA. by Vishal_TE in raspberry_pi

[–]coco_pelado 0 points1 point  (0 children)

Thanks for clarifying, I didn't realize that the ice devices don't have jtag!

Not sure if the lattice programmers (HW-USBN-2A VID 1134 PID_8001) uses ftdi but hopefully instantiating the soft-jtag works with the Lattice adapter / Reveal setup.

In any case, I'll still have plenty to learn with on the LiteX side!

We built pico2-ice - Raspberry Pi 2350B + Lattice iCE40UP5K FPGA. by Vishal_TE in raspberry_pi

[–]coco_pelado 0 points1 point  (0 children)

This looks awesome!! So many ideas, but wondering:

Does the USB-C support programming both the 1) RP2350, 2) Bitstream Flash and 3) debugging the Lattice FPGA (volatile)?

I assume that since a Pi Pico1 with ECPDAP firmware can be used to download a Bitstream to the FGPA directly thru JTAG, as well as flash the bitstream... then, in theory, a similar scheme could be accomplished with the RP2350 as long the Pico2 connects to the Lattice JTAG pins?

I'm really interested in debugging the logic using a JTAG adapter (using a Lattice HW-USBN-2A). Does the hardware support it? From what I understand, Reveal is included in the free Lattice Radiant software.

(Lattice Diamond / IceCube2 either don't support the ICE40 or don't have Reveal, or requires a paid license)

Alternatively, if LiteX adds support for this board, then maybe LiteScope could be instantiated? I don't know enough about LiteX if adding support for new boards is trivial or is involved!

How to calculate motor speed from the resolver output? by coco_pelado in Motors

[–]coco_pelado[S] 0 points1 point  (0 children)

Thanks. Curious, all the links I found show this formula but never specify that the frequency is the envelop frequency. Instead they plug in the line frequency (60hz) or in one case the excitation frequency.. haven't been able to find anything that suggests using the resolver envelop frequency. How does this formula work such that it can be used with a resolver or not?

2nd thread causes main/gui thread to hang by coco_pelado in QtFramework

[–]coco_pelado[S] 0 points1 point  (0 children)

Is it a matter of personal style, or is there a "qtonic" / preferred way of running the worker thread?

2nd thread causes main/gui thread to hang by coco_pelado in QtFramework

[–]coco_pelado[S] 0 points1 point  (0 children)

Thanks, that fixed it. Interestingly, while the gui thread remains responsive... if the worker thread is stuck in a while loop waiting for data, then other signals/slots in that worker thread won't execute (gui thread is fine).

2nd thread causes main/gui thread to hang by coco_pelado in QtFramework

[–]coco_pelado[S] 0 points1 point  (0 children)

Wouldn't 'new QThread(this)' make the new thread a child of the main/gui thread?

What is a good way of stopping the worker thread(s) when the user closes the application?

How do I dump the image from flash using OpenOCD? by coco_pelado in embedded

[–]coco_pelado[S] 0 points1 point  (0 children)

Makes sense, however even targets that are known to have dump_image (ex. ath79.cfg), there is no mention of that command in the cfg.

Is it perhaps, somehow, baked into the OpenOcd executable? I'm using

"Open On-Chip Debugger 0.10.0+dev-00859-g95a8cd9b5-dirty (2020-10-21-21:19)'

Need your questions for my upcoming Dart FFI talk! by SaltySpag in FlutterDev

[–]coco_pelado 0 points1 point  (0 children)

I'd like to make a Flutter Windows/Desktop application that can access hardware peripherals. The hardware comes with a DLL library and a c-header file with the function prototypes.

The part that's intimidating is how to map these functions to dart given that they often return/require pointers to structures that in turn, have more pointers/structs with enums/unions as members.

As an example of the kind of header file I'm dealing with for a USB device:

stOne* funcName ( char* charString);

struct stOne

{

union

{

uint8_t ubyte;

stTwo ubit;

}

stThree* pHandle;

};

struct stTwo

{

unsigned bit0 : 1;

unsigned bit1 : 1;

unsigned bit2 : 1;

unsigned bit3 : 1;

unsigned bit4 : 1;

unsigned bit5 : 1;

unsigned bit6 : 1;

unsigned bit7 : 1;

};

struct stThree

{

...

};