Samsung 6410 bare metal program development 3: Talk about summary and experience

Publisher:平凡幸福Latest update time:2023-05-05 Source: velepKeywords:Samsung Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

During this time, I finally finished the wireless receiving module for short-distance communication. It could have been completed in a week or two, but due to trying to use the eclipse development environment in the first two weeks, I encountered many problems, especially the implementation of the 6410 interrupt. This resulted in the late work being rushed, and it took several all-nighters to get it done, which made me exhausted.

Looking back, this project is worth summarizing and learning lessons from in many aspects. Avoid similar situations from happening again in future projects. The follow-up article will introduce the bare metal program development environment and methods of Samsung 6410.

development environment

For the bare metal program development environment of Samsung 6410, it is natural to use eclipse. If it is done as research and exploration, this is not a bad idea and is actually feasible. But the problem is that this is a development project and there is a time limit. Therefore, you should choose the most correct development environment-RVDS.

One of the biggest problems encountered in eclipse is the implementation of the keyword __irq that modifies the interrupt handling function.

* In C language, the function of the keyword "__irq": When ISR is defined with this keyword, the CPU automatically restores
the LR in the * mode before the interrupt from the stack after the ISR ends, and assigns it to the PC to complete the ISR Return normally. If there is no such keyword, the CPU can only return to
the interrupt state before the secondary ISR , and it is still in the IRQ working mode. Of course, the user program can continue to be executed, but the working mode is incorrect. In this mode,
other IRQ interrupts cannot be responded to *.

__irq is not defined in eclipse, so it must be implemented by referring to the definition in ADS1.2 or RVDS (output assembly instructions). This has encountered a lot of trouble. So far, __irq is still not fully implemented in eclipse.

collect message

Before starting the project, I did not have a deep understanding of the bare metal program development of 6410. Bare metal program routines are provided for Friendly Arms on which to build. Relying too much on Friendly Arms routines resulted in not understanding other companies' bare metal routines.

In fact, the best 6410 bare metal program routine is the 6410_Test project provided by Samsung. This project provides the function implementation and API interface of all modules. Developing on this basis can greatly reduce the workload. Unfortunately, I discovered the 6410_Test project when I was debugging the 6410 SPI driver.

Personally, I think the 6410 bare metal program routines provided by Friendly Arm are not very good, and some routines are problematic, such as the UART routine. The interrupt routine provided is still based on the 51 jump method, not the VIC mode.

In addition, the information on the CD of the Friendly Arm development board, such as schematic diagrams, is very confusing. Putting the various versions together, it is impossible to know which version of the schematic diagram should be used for the development board you purchased.

wireless module

Before this, I had never been exposed to short-range wireless communication modules. The customer required the use of 433MHz short-range wireless communication module CC1101 and assigned us a Taobao seller. After reading the description of the wireless module, the communication distance can reach the customer's requirement of at least 200 meters. So I bought a pair of modules without any research.

During the actual test, it could only transmit more than 20 meters. I asked the Taobao seller again, and he said that their actual measured distance was more than 50 meters. The transmission rate was reduced to a minimum of 1200bps and could reach more than 100 meters in an open area. If you want to reach 200 meters, CC1101 must add PA.

I feel like I was deceived, but we can only blame ourselves for not being careful, not cross-examining or investigating carefully.

Later, I gave up CC1101 and changed to nRF2401, and purchased the nRF2401 wireless communication module with PA+LNA to ensure the communication distance and meet customer requirements. As for how far CC1101 can transmit without adding PA, I won’t go into details.

One of Fan's mistakes here is that the customer specified the wireless communication module for us, but he did not understand it in depth, thinking that the communication distance specified by the customer should be able to meet the requirements.

basic tools

This development involves driver debugging. However, we didn't even prepare basic tools like soldering iron and multimeter. Therefore, when debugging the driver, the efficiency is very low. As the saying goes, if a worker wants to do his job well, he must first sharpen his tools.

Part time confusion

A big obstacle to part-time development projects is that it is inconvenient for project developers to communicate and communicate in a timely manner, and it is also inconvenient to cooperate with debugging. This problem cannot be changed for the time being. We can only continue to strengthen cooperation with each other and explore the best way to cooperate.

improvement measures

The general problems discussed above are ultimately as follows: development projects are carried out independently without planning, planning and coordination. Specific to myself, my mentality in the early stage of the project was not correct and I was too optimistic! Improvement measures are as follows:

  • Before taking on a project, analyze customer needs and investigate the feasibility of the project.

  • Develop project plans, select project managers, and conduct overall planning.

  • When doing a project, you must start from the goal of ensuring the completion of the project, select the correct tools, development environment, hardware platform, etc., and never start the project with a learning mentality.


Keywords:Samsung Reference address:Samsung 6410 bare metal program development 3: Talk about summary and experience

Previous article:Samsung 6410 bare metal program development 2: establishing eclipse bare metal program project
Next article:Samsung 6410 bare metal program development 5: Use Samsung’s official 6410_Test project to develop bare metal programs

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号