Project

General

Profile

JNZv4 FORTH communication issue

Added by plutonomore 29 days ago

Hi,

A while back I reported that I was having problems flashing jz4-release.hex to flash. I have waited until now hoping that
someone who has been using the JNZ v4 and a BUB III and Folie 2.12 in a Windows environment would reply ... unfortunately
this hasn't happened.

To be honest, I have encountered several other problems as well when trying to communicate with the JNZ v4. Essentially
beside getting the sign-on message and cursor from the Mecrisp interpreter installed on the JNZ v4, I am unable to get any further.
What appears to happen is that when I enter a FORTH command line eg. 1 2 + . and hit the the 1 2 + . vanished ... looks like
there is a and no and the 1 2 + . is over written? Please see attachments a, b and c.

Hopefully this behaviour will be of help in diognosing these problems. When the JNZ v4 is connected to the USB port via the
BUB III, the A4 LED is ON permanently. As soon as the port is identified and connected as COM 3 via Folie the A8 LED is
permanently extinguished. If Control C (uC reset) is initiated the A8 LED turns ON briefly (< 1s) and then turns OFF again.

From my understanding at least 140 JNZ v4s are out there somewhere, so surely someone has had used a JNZ v4 under the
above mentioned setup? Any ideas, comment etc. appreciated, as at the moment my JNZ v4 is pretty useless.

PS. I suspect the problem probably lies with me, so please prove me wrong!

    cheers,

        Matt.

JNZ v4 29052017 a.jpg View - JNZ v4 Mecrisp FORTH initial screen capture (17.2 KB)

JNZ v4 29052017 b.jpg View - JNZ v4 Mecrisp FORTH command screen capture (17.6 KB)

JNZ v4 top 29052017.jpg View - JNZ v4 (top) BUB III USB cable (286 KB)

JNZ v4 29052017 c.jpg View - JNZ v4 Mecrisp FORTH screen capture after command <CR> (17.1 KB)

JNZ v4 bottom 29052017.jpg View - JNZ v4 (bottom) BUB III USB cable (255 KB)

2614
2615
2616
2617
2618

Replies (12)

RE: JNZv4 FORTH communication issue - Added by jcw 29 days ago

Sorry to hear this.

Folie reads a line w/ echo and line editing, and when you press <enter>, it sends it over, sends a CR, and clears the line again. That's because Mecrisp will echo the input (plus anything printed) followed by a LF, so Folie is meant to just report that on its stdout.

There are some plans to change the default Mecrisp behaviour for Folie use, but the above is what is happening today.

Not sure I understand your A4 vs A8 LED comments.

Can you measure the resistance between pins 1 and 2 on the FTDI header? (pin 1 being GND) - it should show about 10 kΩ, i.e. there should be a resistor weakly pulling pin 2 low. Something seems to be preventing Mecrisp from running, beyond its startup message.

Have you tried re-flashing the unit with the !u 6 command?

Can you try connecting to the BUB with just pins 1, 3, 4, and 5? - i.e. leave out the DTR and RTS pins.

You should also be able to connect via an app such as picocom or teraterm. Entering a line should produce a response.

RE: JNZv4 FORTH communication issue - Added by plutonomore 29 days ago

Hi,

Once again, thanks for the super quick response, much appreciated!

(i) Sorry for the confusion with the A4 and A8 pins. I am referring to the A8 pin. This is pin 18 (LED)on the STM32L052K8T6 uC ... the A4 was a typo.

(ii) Measured the resistance between pins 1 & 2 on the FTDI connector and indeed the resistance is 10K ohms.

(iii) Didn't try flashing the JNZ v4 using !u 6 ... didn't want to risk trashing the JNZ v4. Built a JNZ v4 clone for this sort of stuff. Am able to load Mecrisp
FORTH using !u 6 with the DTR and RTS pins connected, although as alluded to previously, can't load jz4-release.hex using this set up.

(iv) Wired up BUB III with DTR (uC pin #4 ie. reset pin) and RTS (uC pin #31 ie. BOOT0 pin) disconnected ... BINGO !!! Folie Communication with Mecrisp
FORTH interpreter. Please see attachments.

(v) Wired up BUB III with DTR (uC pin #4 ie. reset pin) and RTS (uC pin #31 ie. BOOT0 pin) disconnected ... BINGO !!! Putty Communication with Mecrisp
FORTH interpreter. Please see attachments.

Hope this information is of assistance in diognosing this issue!

    cheers,

        Matt.

RE: JNZv4 FORTH communication issue - Added by jcw 28 days ago

Very puzzling ... the behaviour you describe resembles the problem we had with DTR being the wrong polarity in Folie v2.11 - but that should have been fixed in v2.12! Can you retry downloading the windows exe?

RE: JNZv4 FORTH communication issue - Added by jcw 28 days ago

The other thing to try, even when stuck: hit ctrl-c, or enter !reset (same thing).

RE: JNZv4 FORTH communication issue - Added by plutonomore 28 days ago

Hi,

As you requested, tried downloading jz4-release.hex again ... no luck! Also tried loading jz4-release.hex again locally, also no luck.
Please see attached screen captures.

Also, please see attachments for ctrl-c and ! reset testing. For this testing, hit ctrl-c, followed by another ctrl-c and then typed
a ! reset.

These tests were conducted on the jnz rev4 clone, as stated before don't want to risk trashing original jnz rev4. Also attaching
schematic of jnz rev4 clone ... might be of some use. Please note the clone has a manual reset button ... which appears to have
absolutely no visible effect when pressed. Hope this helps!

    cheers,

        Matt.

RE: JNZv4 FORTH communication issue - Added by plutonomore 28 days ago

Hi,

Whoops, stuffed up that schematic ... let's try again!

    cheers,

        Matt.

RE: JNZv4 FORTH communication issue - Added by plutonomore 27 days ago

Hi again,

I decided to do a little further investigation of this issue today ... some interesting developments!

Finally managed to flash the jz4-release.hex file to the jnz v4 clone ... don't get too excited. Had to
jury rig a little concoction together to achieve this. The clone was wired to the BUB III without the DTR
and RTS wires of the BUB III connected. Instead used the clone reset button to take care of the DTR
function (uC RESET) and wired up a toggle switch to take care of the RTS function, ie.to switch the BOOT0
pin between 1 and 0 (uC Bootloader) ... yeah messy but it works! OK, this takes care of the hardware set up.
Please see attached pic.

Next, the flashing procedure.
(i) Use toggle switch to set BOOT0 to 1.
(ii) Press clone reset button.
(iii) Launch Folie 2.12 .
(iv) Select COM9.
(v) !u /Folie/jz4-release.hex. ENTER.
(vi) When upload completed, press CTRL-D to exit Folie.
(vii) Use toggle switch to set BOOT0 to 0.
(viii) Press clone reset button.

BINGO, the clone is loaded "SUCCESSFULLY" with the jz4-release.hex file as evidenced by the sign on
message rabbiting on on about the uC type, chip ID, memory capacity and ok. etc. Also the LED attached
to the A8 pin (pin 18 on the STM32L052K8T6) is ON permanently. Used the FORTH led iox! ENTER
command to toggle the LED ON and OFF several times ... hey this thing WORKS!! Please see screen
capture attachment.

All this suggests to me that there is a problem with BUB III / JeeNode Zero interface control pins.
Your thoughts and input appreciated.

    cheers,

        Matt.

RE: JNZv4 FORTH communication issue - Added by JohnO 27 days ago

Well done Matt, was the STM32L052K8T6 a virgin chip when the procedure as started. I wonder if an earlier attempt had put it in a mode where BOOT0 was required. Are you able to flash it again without all the special provisions?

RE: JNZv4 FORTH communication issue - Added by plutonomore 26 days ago

Hi John,

Thanks for the reply and interest . To answer your question ... probably not, the uC bootloader had no problem
loading Mecrisp FORTH using the !u 6 command.

    cheers,

        Matt.

RE: JNZv4 FORTH communication issue - Added by martynj 25 days ago

@Matt,

Have you looked at the Control Panel settings for the selected COMxx? There is a curious RTS control under 'Advanced'.

RE: JNZv4 FORTH communication issue - Added by plutonomore 24 days ago

Hi Martyn ,

Thanks for the comment. If you would like to elaborate, this might be helpful.

Also, it just occurred to me that you would find yourself (Digital Smarties), in a pretty unique situation as a distributor of Jeelabs related products ie. you should have access to these products.To be more specific Folie 2.12, Windows OS, BUB III and JNZ v4. Have you actually set up this arrangement and tested it without issue?

    cheers,

        Matt.

RE: JNZv4 FORTH communication issue - Added by plutonomore 7 days ago

Hi,

I have constructed another clone of the jnz v4, this one is a bit tidier than its predecessor.
There is definitely an issue with the jnz v4/BUB III control pins. I hope that the new Folie
wireless mode setup currently in the pipeline will make this of no real consequence.

Anyway, am attaching the Eagle files and a couple of photographs ... hopefully these will
make sense of the construction. You will notice that this thing uses a RFM 69HW radio
module, through-hole components wherever possible and a totally different form factor.
Who knows, someone may find it of interest?

    cheers,

        Matt.

PS. Still haven't heard back from either Digital Smarties or Modern Device as to whether
they have successfully tested this combination !!

    (1-12/12)