Author Topic: FT232HL config  (Read 6226 times)

0 Members and 1 Guest are viewing this topic.

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #25 on: May 24, 2018, 08:31:51 pm »
Okay, I've tried:

20cm - fail
1m - fail

the whole god damn 100m roll - success (steel sheet core fyi)

It seems to always fail when the frequency is changed, no success at least so far.
« Last Edit: May 24, 2018, 08:34:44 pm by CM800 »
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #26 on: May 24, 2018, 08:34:53 pm »
OK, this is interesting...

Next step to try then is some capacitance to ground then (but less than 2.2nF). With a MachXO2, Diamond Programmer, and a MPSSE cable I found 18pF worked but I suspect you may need a bit more than that.

I think the problem might be related to noise on the clock line causing spurious clocks but I'm not completely sure.
 

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #27 on: May 24, 2018, 08:48:10 pm »
Okay,

With a low pass filter stile setup ( clk in >> --- RES --- CAP2GND --- >> out )

i can go up to 330pf (and any values under it) with SRAM mode operationally. with the 270R resistor.

trying to remove the resistor at any capacitor value stops operation.
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #28 on: May 24, 2018, 08:50:16 pm »
You should be able to get away with more capacitance if you decrease the clock frequency again.

What is happening during flash programming with the RC filter?
 

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #29 on: May 24, 2018, 08:53:50 pm »
You should be able to get away with more capacitance if you decrease the clock frequency again.

I have yet to have any success with any programming frequency change in any resistor / cap combination so far.

I hasten to keep playing with it as with no sucesses, it adds more time to any combination tests. I feel like we are fighting in the dark here.

What is happening during flash programming with the RC filter?

With 550pf I get a different flash ID and it gets stuck on the first erase:



Compared with the standard one with just a resistor:




 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #30 on: May 24, 2018, 09:00:05 pm »
Yeah, never tried the frequency change myself so can't say for sure that it works at all.

I have seen that some Upduino boards have used recycled flash memory chips (confirmed on one site by the presence of Cisco strings in the flash). It could be that the one on your board has software write protect enabled, which is causing writes to fail.

Can you try replacing iceprog.c with this one:
 https://github.com/daveshah1/icestorm/blob/unbrick/iceprog/iceprog.c
rebuilding iceprog, and running "sudo iceprog -p", then trying a write again (keeping the resistor and a low value capacitor)?
 
The following users thanked this post: CM800

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #31 on: May 24, 2018, 09:19:20 pm »
Well... What do you know... It works! (FLASH)

With that version, the 50pf Cap and resistor, it works

if I remove the 50pf it fails (or if I tweak it / at random fail)  it seems right on the edge. I'll try values either side too.

If I try slightly above or below 50pf, amazingly it doesn't work. I've tried 47pf even (and 100pf) with failure.

Sticking with 50pf and going down to 100R it works still.


50pf & 270R : WORKS
anything else & 270R : FAILS

50pf & 100R : WORKS
100pf & 100R : FAILS
30pf & 100R : FAILS



« Last Edit: May 24, 2018, 09:35:00 pm by CM800 »
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #32 on: May 24, 2018, 09:33:51 pm »
OK, good to know. Trying a shorter cable, if you haven't already, may also be a good idea (but keep a bit of capacitance to ground).
 
The following users thanked this post: CM800

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #33 on: May 24, 2018, 09:35:47 pm »
OK, good to know. Trying a shorter cable, if you haven't already, may also be a good idea (but keep a bit of capacitance to ground).

Updated my previous post with some more numbers.

Amazingly high precision of setting needed.

What has changed in your file as opposed to the 'stock' version?
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #34 on: May 24, 2018, 09:38:10 pm »
The only thing changed in that file is a new -p option to disable write protection. After running that file once with -p, both should have the same results.
 
The following users thanked this post: CM800

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #35 on: May 24, 2018, 09:42:14 pm »
The only thing changed in that file is a new -p option to disable write protection. After running that file once with -p, both should have the same results.

Okay,

It seems really inconsistent with programming times, or outright failure. Trimming the cable sounds like a good idea.

I would love to make this thing more reliable / certain.
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #36 on: May 24, 2018, 09:45:44 pm »
My personal setup, which has always worked reliably, has been an unmodified MPSSE cable with the pins going straight to headers on the Upduino, except for the clock where I added 20cm of extra wire. This has always worked 100% reliable for me.
 

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #37 on: May 24, 2018, 09:47:57 pm »
My personal setup, which has always worked reliably, has been an unmodified MPSSE cable with the pins going straight to headers on the Upduino, except for the clock where I added 20cm of extra wire. This has always worked 100% reliable for me.

Thanks for the Info Dave,

I really appreciate your help this evening! nice to finally get these damn things running.
 
The following users thanked this post: daveshah

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #38 on: May 24, 2018, 09:50:31 pm »
No worries! Glad to see something working in the end :)
 
The following users thanked this post: CM800

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4760
  • Country: nr
  • It's important to try new things..
Re: FT232HL config
« Reply #39 on: May 25, 2018, 04:48:02 pm »
I programmed upduino v1 with the cheapo ft232h board (no eeprom on the board), no messing with the FT_prog, under win7 and Diamond programmer. 20cm flying leads, no capacitor needed. Worked ok.
Also have a look at the upduino v2 schematics - there is the ft232h sitting on the board, also no capacitor needed.
When messing with the capacitor, mind its capacitance matters a lot.
100pF-2200pF is way too much, imho, when adding the 100ohm in series even 50pF seems to be toooo high.
The C or RC slows down the edges (such it "delays" the signal).
The delay is approximately
Code: [Select]
t=0.7*R*C [seconds, ohms, farads]where R is a series combination of the FT232H's pin output's "resistive impedance" and the additional resistor you are adding in series. The impedance of a cmos output is typically something like 100-200ohm. Thus you may calculate the delay (and double-check by watching the oscilloscope). IMHO when a delay is really needed (as Dave is indicating) a few nanoseconds (5-10ns) would be enough (based on the above equation aprox. 20-30pF without the additional 100ohm resistor).

PS: the Diamond Programmer configures the FT232H for the MPSSE (for programming) automatically. When the FTDI VCP driver is installed, the inserting the FT232H into the USB plug configures it as the USB/UART adapter by default. In Win7 you do not need the d2xx drivers installed, VCP is enough for iCE40 programming and USB/UART.
« Last Edit: May 25, 2018, 05:10:03 pm by imo »
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #40 on: May 25, 2018, 04:53:03 pm »
I think it is a particular issue with the MPSSE cable, and I'm not sure whether it is actually a case of a delay being needed; or rather noise being induced on the clock line and causing false pulses which any extra capacitance from a added capacitor or bit of wire filters out.
 

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: FT232HL config
« Reply #41 on: May 28, 2018, 01:28:09 am »
For sake of not opening up another thread, does anyone know any examples of RAM / Multiplier use with the icestorm?
 

Offline daveshah

  • Supporter
  • ****
  • Posts: 356
  • Country: at
    • Projects
Re: FT232HL config
« Reply #42 on: May 28, 2018, 06:31:31 am »
For the UltraPlus 1Mbit SPRAM, have a look at https://github.com/daveshah1/micropython-icevision/blob/master/ports/icevision/rtl/up_spram.v

For the regular 120kBit of block RAM, follow any generic verilog ram example and Yosys will infer block RAM.

For the multipliers, have a look at https://github.com/daveshah1/icestorm/blob/99857b1505fa6c651ad9cd4177d8fc68d3e3851c/examples/up5k_mac16/mac16.v
 
The following users thanked this post: CM800

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4760
  • Country: nr
  • It's important to try new things..
Re: FT232HL config
« Reply #43 on: May 28, 2018, 04:30:56 pm »
Forth System on Chip: SPRAM+BRAM+MUL16x16 in the icestorm (as well as in IceCube2 and Radiant):
https://github.com/igor-m/UPduino-Mecrisp-Ice-15kB
https://github.com/igor-m/UPduino-Mecrisp-Ice-15kB/tree/master/icestorm%20version
« Last Edit: May 28, 2018, 05:04:40 pm by imo »
 
The following users thanked this post: CM800


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf