hi
I am using HSC12 (MC9S12E256) and do not understand how I should configure the COP to call the interrupt
If I configure COPCTL = 0x46, the CPU resets after overflow COP
Thanks
Hi RadekS
OK ... I think I have all the answers
Unfortunately, in the datasheet it was not indicated the need for a buffer to DAC
I thought I had forgot a few settings in the registers
Modify the PCB and try again
Thanks for your help
Hi RadekS
Secured MCU with only external flash .....unfortunately the PCB is already designed without external flash
Unsecured MCU with internal and external flash ....It is probably the only solution...unfortunately
Secured MCU with only internal flash .....I can use EBI in the normal single chip for access to data?
The last problem ... I hope :smileylaugh:
MC9S12E256 ...I tried to use the analog output ... if you load the output with 47Kohm it overload
There are detailed specifications of this analog output ...max current output?
Thanks for your help RadekS
Hi marcobarison,
About “Secured MCU with only internal flash .....I can use EBI in the normal single chip for access to data?”)
In normal single chip mode, external bus is not active. I agree that it is strange, but we cannot guarantee security of internal flash content with fully opened back door (or gate) – by external bus.
About S12E DAC current capability)
I would like to apologize, I thought the datasheet had been adjusted and all info is there.
I have not found info about output driving capability so I went through our service requests database and I found following information which I believe will help you:
The DAC is a voltage output. The supplied current is very low. We have found some recommendations for the output of the DAC. It should have a minimum (meaning maximum resistance) R-load of 5 Mohm and a maximum C-load of 50pF @ 5V supply so the maximum current it can provide is about 1 uA.
The DAC Module is not designed to provide lots of power so you may use a current buffer at the output to boost its power capabilities.
You may use a voltage follower with OP-AMPs to draw the current you need from the power source and use the DAC output only as a voltage reference so you won’t draw current from the MCU.
The DAC may be able to draw more current but operating outside the absolute maximum/minimum ratings may lead to malfunction or even damage to the device.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Unfortunately it does not work ... when I program 0xFF0F = 0xFD the MPU is lock, but not the sotware works
my configuration:
Hardware: MODA=0 ,MODB=0 ,MODC=1 ,ROMCTL=1 ,XCLKS=0
oscillator frequency=16MHz
PLL=disable
Start in Normal single chip mode and changed by software in the normal expanded wide
The software is the internal flash
Memory MAP:
Internal RAM: 0x000000 -> 0x004000
External RAM (EBI): 0x004000 -> 0x0077FF
MPU Register: 0x007800 -> 0x007BFF
External device (EBI): 0x007F00 -> 0x007FFF
Flash DATA/CODE: 0x00C000 -> 0x00EFFF
Vector: 0x00FF80 -> 0x00FFFF
Bancked DATA (Flash): 0x308000 -> 0x30BFFF
Bancked DATA (Flash): 0x318000 -> 0x31BFFF
Hi marcobarison,
thank you for these details. Now it is clear.
When we secure MCU and switch into the extended mode, internal flash will be disabled for safety reason.
I could imagine a case when the attacker connects the external memory which contains code for reading internal flash. In that case, security feature cannot protect internal flash content. Therefore, internal flash is disabled when MCU is secured and selected is expanded mode.
You still could have secured MCU, but all code has to be executed from external flash. This is accomplished by resetting directly into expanded mode. The internal FLASH will be disabled. BDM operations will be blocked.
Possible options:
I hope it helps you.
Have a great day,
RadekS
Hi RadekS,
Sorry for my second thread
Ok, I found the problem ...the reset pin is pulled up with a 4.7Kohm resistor and a capacitor to ground by 100nF
I changed the resistance and capacitor: R=1.2Kohm and C=3.3nF the problem was solved.
Problem 2:
I use cyclone-pro and if I program the internal Flash with PROG12Z, my application works.
If I "secure device" use of PROG12Z my application not working
I tried to program the internal Flash HCS12 with a small application example, but not working with "secure device"
how do I lock the internal flash of the HCS12 ... with the application that works?
Thanks for the help
Hi marcobarison,
I am glad that issue was solved.
Unfortunately my experiences with PROG12Z are limited.
In general: You need modify address 0xFF0F for secure MCU. For example:
const unsigned char security_byte @ 0xFF0F= 0xFD; // address FF0F stores 0xFD: secure device with backdoor key disabled
More details about security at S12(X) devices:
https://community.freescale.com/docs/DOC-93803
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Marco,
Yes, if you have not write 0X0055 and 0X00AA tothe ARMCOP register during the selected time-out period , it will reset.
We can see this in the MC9S12E256 Data Sheet -> 4.4.5 Computer Operating Properly Watchdog (COP)
When time out ,a reset will occur very quickly and you may not be able to see the ISR entered before the reset occurs.
So you have not see it call the interrupt.
Hope it helps
Alice
Hello Alice,
I already ARMCOP use in my program, but if the program crashes should call ISR
How do I disable the CPU reset?
How do I call first ISR?
Thanks for the help
Hi marcobarison,
It seems that this question is the same as your second thread:
https://community.freescale.com/message/627676
Please look at my answer there.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------