NEC V850: Things to note after powering on the system

Publisher:心灵之舞Latest update time:2016-10-07 Source: eefocusKeywords:NEC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Compilation environment: IAR For V850 3.81 + MiniCube2

Hardware environment: D70F3630 (D70F3377A) 


 At the beginning, I encountered many problems, mainly because I was not familiar with the hardware structure.

The first problem is that the hardware simulation can proceed normally, but after the hex file is generated and downloaded to the target development board, the system will reset inexplicably.

I was troubled by this problem for 3 days, and finally found out that it was because OptionBytes was not set. This OptionBytes is used to set some clock selection and frequency multiplication information, so it must be added, and the watchdog timer must be disabled at the beginning of the main function. There is an option.s85 file in the code generated by Applilet2 for V850ESFx3. As long as you include this assembly file in your project, you can set OptionBytes.


;****************************************************** ******************************
;* Global define
;********************** *************************************************** **********
#define CG_OPTION7A 0x00
#define CG_OPTION7B 0x80
#define OPT7C 0x00
#define OPT7D 0x00
#define OPT7E 0x00
#define OPT7F 0x00

;****************** *************************************************** ************
;* This is the default initialization string of the Option Byte(s).
;* For details about valid values ​​and their meaning,
;* please have a look into the device User's manual
;****************************************************** ****************************
COMMON INTVEC:CODE:ROOT(2)
ORG 7AH
`OPTBYTES`:
DB CG_OPTION7A
DB CG_OPTION7B
DB OPT7C
DB OPT7D
DB OPT7E
DB OPT7F
END



void main(void)
{
WDTM2 = 0x1F;

... ...
}
The second problem is that external interrupts do not respond.
This is due to hardware reasons. The buttons on the MCU forgot the pull-up resistor and only had a capacitor to ground, so they were unable to respond to interrupt events.
The buttons connected to the MCU must be equipped with pull-up resistors.
Finally, here is the simplest project list diagram

NEC V850 system power-on precautions - Beans - Code Beans				   
Keywords:NEC Reference address:NEC V850: Things to note after powering on the system

Previous article:NEC V850 General Purpose I/O Ports
Next article:NEC D70f3630 (3377) port operation

Recommended ReadingLatest update time:2024-11-15 18:26

Is Japan hiding its strength? What will happen in the future?
Japan recently imposed trade sanctions on South Korea, threatening to restrict exports of semiconductors and display materials to South Korea. Market rumors say that South Korea may face a shutdown crisis when its semiconductor materials run out! Experts pointed out that it is no exaggeration to say that when the exi
[Embedded]
Is Japan hiding its strength? What will happen in the future?
SKYX files application to ask the National Electrical Code (NEC) to impose mandatory safety standards for its home and building ceiling receptacles
- As part of the application, the company provided significant data on hazardous incidents associated with electrical wiring installations. SKYX's ceiling socket platform enables lights, ceiling fans and smart home products to be connected to the ceiling more safely, quickly and reliably - The most recent important
[Industrial Control]
NEC V850 Key Interrupt
There are 8 key interrupts in V850, which are very easy to use. Let's finish it today. Although there are 8 keys for interrupt, it only has one interrupt vector. Compared with STM32, it feels that V850 is much more stingy than cortex-M3. So if more than 2 keys are used, it is necessary to determine which pin it comes f
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号