Arduino as ISP + Flash Magic don't work on NHS3152

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Arduino as ISP + Flash Magic don't work on NHS3152

1,781 Views
achraf_kabbabi
Contributor II

Hi everybody,

I want to use a NHS3152 to monitor external resistors in "real-time".

I'm trying to upload a demo code on a NHS3152 chip with an Arduino UNO board (as ISP programmer), but I'm already facing a basic issue : I get a "Failed to autobaud" error.

I guess it means the NHS3152 couldn't be successfully detected, but I can't figure out why.

error.png

Here is how I wired the NHS3152 to the Arduino :

- The NHS3152's MOSI to Arduino's MOSI (11)
- The NHS3152's MISO to Arduino's MISO (12)
- The NHS3152's SCLK to Arduino's SCK (13)
- The NHS3152's SSEL to Arduino's SS (10)
- The NHS3152's VSS to Arduino's GND
- The NHS3152's VDBAT to the Arduino's 3.3V (because the chip doesn't support more than 3.6V)

wiring_diagram.png

I assumed the pins shown in the datasheet correspond to a top view.

Here is the real setup (without the wires) :

20181106_153239-min.jpg

I checked that all Arduino's pins don't deliver more than 3.3V (the digital pins 10,11,12,13 deliver 1.7V).

Does anybody see something wrong in what I proceeded ? Any suggestions ?

Thanks for your help !

Labels (1)
3 Replies

1,438 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Can you check this post? NHS3100 Flashing using FlashMagic  I believe they had the same issue as you do. 

By any chance, have you checked the guide AN NHS31xx Firmware Flashing?

That guide will help you through the process, for this device, it is most common to use the built-in download feature in the LPCXpresso IDE and it's made for the Lpc-Link2 debug board to communicate with an NHS31xx IC.

Regards, 

Estephania 

1,438 Views
achraf_kabbabi
Contributor II

Hi Estephania,

Thanks for your answer.

I have all the necessary documentation, I also checked the link about the NHS3100 Flashing.

I canceled my plan of trying to program the NHS3152 with Arduino as ISP, and I bought the LPC-Link2 instead.

The LPC-Link2 gets successfully detected by LPCXpresso, as well as Flash Magic. However I still can't communicate with the chip !

Here is how I wired the setup (this time it doesn't follow the ISP/SPI wirings but JTAG/SWD instead) :

- NHS3152's PIO_10/CT32B_M0/SWCLK (15) to the JTAG's SWDCLK/TCK (4)

NHS3152's PIO_11/CT32B_M1/SWDIO (16) to the JTAG's SWDIO/TMS (2)

NHS3152's RESETN (9) to the JTAG's nRESET (10)

NHS3152's VDBAT (7) to the JTAG's VTREF(1)

NHS3152's VSS (8) to the JTAG's GND3 (3)

And the JTAG/SWD connector is connected to the J7 block of LPC-Link2.

jtag.png

Did I wire the setup wrong ?

(I didn't connect the JTAG's GND3 and GND5 and GND_DET as suggested by the schemata, by the way I assumed this "Ground" comes from the LPC-Link2, or do I need to connect it to an external ground ?)

N.B: One thing that worked for me : Programming the chip through my Android phone (via NFC) using the compiled .bin file, thanks to the NHS31xx Downloader app !

However, the programming process is a "one-shot" : Once I upload a program on the NHS3152, I can't upload a second one (or if the downloading fails, the chip is dead and I can't communicate with it anymore) ... And I guess using the LPC-Link2 and LPCXpresso is supposed to make me reprogram the chip as many times as I want. I can't debug for the moment.

I'm a newbie to the field so maybe I missed simple things, please let me know if you have an idea.

Best,

Achraf

0 Kudos

1,438 Views
achraf_kabbabi
Contributor II

I finally managed to solve the problem, now I can program the NHS3152 chip with LPCXpresso and Flash Magic.

My wiring was correct.

What I was doing wrong is the following two points :

1. I wasn't putting the JP2 pins in short-circuit on the LPC-Link2 board, now I do

2. AND I wasn't powering the chip during the programming, now I do

If I was missing one of the two points, the chip wasn't detected.

Best,

Achraf