Hi, I have encountered strange behaviour of S08SH8.

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

Hi, I have encountered strange behaviour of S08SH8.

1,035 Views
lucyperek
Contributor II

When I set on SOPT1 register BKGD pin as normal I/O then USB Multilink interface refuses to enter debug/programming mode. It of course asks for cycling power but it gives no result. I have tried that on three chips and the situation repeats. What can the way to enter programing mode again and to reprogram it ?

Labels (1)
0 Kudos
5 Replies

931 Views
Leojunin
Contributor III

Yours firmware is to be authorized to enter debug mode with the BGND instruction once is running.

0 Kudos

931 Views
lucyperek
Contributor II

Hi, thanks for a suggestion, but what do you mean by "authorizing firmware" ? The thing is that I have never used BKGD and RST pins as I/O but I always leave them just for programming and debuging. So I have never encoutered such problem - this time I needed these two pins. MCU refused to enter even programming mode after the status of BKGD pin was changed. Normally if MCU is protected you can still enter programming mode and erase it. Now there is no access at all. How I can "authorize " it ?

regards

Jacek

0 Kudos

931 Views
Leojunin
Contributor III

Now I know better. One idea that occurs to me is that before starting the configuration of the chip will give a delay (1ms) to allow the debugger enter before BGND pin functions as I / O.

Now, it never happened to me s08 series, it happened to me once with QY4, but to recover those lost chips than you think. I do not know. Try to give more time irq, to enter.

Or send me or post the piece of code that make up the BGND and IRQ pin, so I try here.

Saludos.

Leo

0 Kudos

931 Views
lucyperek
Contributor II

I have tried the same with SH16 powered from 3.3V. It works. The first visible difference is that when SH16 is powered blue LED in USBDM interface doesn't blink. Only yellow lights up. OK, when I program SOPT1 and security, PROGHCS08 requires power down but then starts normally asking for algorithm.

SH8 powered from 5V on another board behaves different. After powering blue LED gets off for circa a second then both LEDs light up. But there is no communication.

I have tried newer version of USB BDM with newer programming software. One time I have managed to get a normal start of program but there was a refusal to load programming algorithm.

The command I send is :

LDA #%0000010​​0

STA SOPT1              (SOPT1 is located at $1802)

I need to change a bit software in existing boards but I completely cannot enter to programming procedures. You are right, I also have never encoutered such a phenomenon. If chip is secured then it asks for erasure, OK, but then I can normally reprogram it.

In QY4 there was an internal error in MCU, I had the same. I have observed very strange activity on IRQ pin when there was attend to enter programming procedure. I was putting 10nF there to cut these oscillations and it was helping.

regards

J

0 Kudos

931 Views
lucyperek
Contributor II

OK, the problem was solved ! My advice to everyone who suffers similar problem : this is not a bad communication between MCU and BDM Multilink but communication crash between PC and BDM on USB link. When target system is powered down and up (as the software asks for that) tne because of some spikes transmitted to PC through BDM (most probably it has no galvanic isolation), PC breaks USB connection and starts again. The simplest solution is to use in such a case a laptop powered only from a battery.

0 Kudos