Archives
-
Help: program C8051F120 on-chip SRAM via JTAG ???
———————————————————————-
The only connection required to download, execute, debug and test assembly language programs on the C8051F120 development board is the 10-pin ribbon cable that connects to the C8051F120 JTAG interface. This also works with C8051F120 chips in my own PCBs.
Now I want to do something a bit different through the JTAG interface, and I’m not sure how. On my PCB an 1MB 8-pin serial flash memory chip is connected to the C8051F120 via the SPI interface. Now I need to program that flash memory with firmware that will eventually be read back by the C8051F120 and written into an FPGA during device initialization.
I’m not sure what is the best way to accomplish this. In fact, I’m not even sure this can be done in any non-gross way.
—–
#1: extremely gross way
I suppose the worst possible way to program the external flash memory chip is to:
— A: somehow break up the 1MB image of the external flash memory chip into 8 to 17 sections each between 64KB and 128KB.
— B: somehow append each data section onto the end of short assembly language programs as literal DATA (plus the address and number of bytes where the data belongs in the external flash memory).
— C: assemble and download these programs into the C8051F120 flash memory per normal development practice.
— D: after downloading each of these 8 ~ 17 programs (plus 64KB ~ 128KB of data), execute the C8051F120 program — which reads the data from its own flash memory space and programs it into the specified address space in the external flash memory.
Of course, the above must be done 8 ~ 17 times to program the entire 1MB external flash memory chip. Somehow this needs to be automated… I’m not quite sure how.
—–
#2: the less gross way
Essentially the same as #1 above, except figure out some way to download 8KB of data into the C8051F120 on-chip static RAM memory. I’m not sure whether the existing JTAG interface (and development tools) provides a way to download data into the C8051F120 on-chip static RAM or not. But if such a way exists – this would help avoid trashing the C8051F120 on-chip flash memory due to excessive reprogrammings.
Question: is there any way to set the values of the C8051F120 on-chip static RAM via the JTAG interface?
—–
#3: one convenient way
If the C8051F120 and/or JTAG interface has any way for the C8051F120 to read data from the JTAG interface (byte by byte), that would be perfecto! Then the C8051F120 program could simply read data from the JTAG interface (into its static RAM temporarily), then program the data into the external flash memory chip.
—–
#4: less convenient way
If the JTAG interface can write data into [just about any] two C8051F120 registers, then the data could be sent from the development system to the running C8051F120 program byte-by-byte (the second register being toggled back-and-forth between 0×00 and 0xFF to handshake (to assure each byte is read correctly == to make both ends match speed).
—– —– —–
So, my question to more knowledgeable programmers of these chips is…
How can I accomplish what I need – in any of the above ways, or in any other way that I haven’t thought of myself.
PS: I very much don’t want to attempt to hack some kind of gross connection to the PCB to connect to the C8051F120 UART or I2C pins (which are also attached to other gizmos on this PCB).IP: Logged Scotty
Member posted June 21, 2010 11:59 AM
———————————————————————-
Hi bootstrap,
I think AN105 and especially AN117 would be of interest for you.
Using the On-Chip Interface Utilities DLL would not enable you to directly modify port bits(*) and program the serial flash via bitbang, but it should enable you to write a PC application which programs the F120 with a firmware which writes the content of XRAM to the serial flash. Since the DLL enables you to set break points and write to XRAM, the application can update the XRAM each time the breakpoint is reached. After the serial flash is programmed, you can program the normal firmware to the F120.
Regards,
Scotty
(*) I’m not sure because AN117 states that internal RAM could be written to (and therefore the ports, too), but I couldn’t locate any information on how to differentiate between direct and indirect accessed RAM.
[This message has been edited by Scotty (edited June 21, 2010).]Related Forum Messages
- Accessing Flash memory of C8051F120 chip
- Read lock in C8051f120
- Regarding C8051F120 Flash Programming
- Interfacing dac with c8051f120
- C8051F120 Silabs Microcontroller SPI Problem??
- Problem JTAG F120 JTAG_util1.c
- C166 external Flash programming throught JTAG interface.
- How to create ROM CHECKSUM for C8051F120 used in banked code flash.
- How to sense feedback voltage using C8051F120 Development Kit
- C8051F120 ISR List?
- Flash memory(external)
- External Flash Memory chip for ATMEGA8515?
- How to interface LCD with C8051F120
- Philips LPC2214 ARM7 and external Memory
- Ability of c8051f120
- Program external flash memory through JTAG
- Bootloader for c8051F120
- Internal SRAM and External SPI flash download using ULINK2 for LPC4330
- Problems programing with AVR Dragon
- C8051F120 Scratchpad with SDCC
Hi der, Can ne1 plz suggest me a proper code to access flash memory of C8051F120 in Keil C.m not sure how to conver d MOVX n MOVC instructions in C. Also m kinda uncertain abt d proper order of d sfr assignments...I am using C8051f120 MCU. I want to put a read lock in so that no one can read the code memory using JTAG interface. I checked the flash Utility in UVision but found there is no option to set the read lock. Can someone help me as in how can I set the read lock---------------------------------------------------------------------- Hi, I am using C8051F120 micro controller. I am working on Flash programming and i am getting some problems. description of my application: The user will enter some data from the keypad and the data will be displayed on the LCD and also will be stored in the Flash memory. We have given an option to the user to edit the data any time. If the user wants to edit the data we need to updated the edited data in the Flash i.e, same location(already some data has been written). If we write the data to the same location the data is not updating. 1)Do ...---------------------------------------------------------------------- sir, i am using a c8051f120 development kit..there are two stages in the first stage i ma using the inbuilt DAc to get the voltage which is inputed to the XR2206 where the output is the AC sinusoidal voltage..this acts as an input to DAC0808ic for digital amplitude amplification.for interfacing this DAC to the c8051f120 i need a port to get activated to send data to the external DAC ..but now the problem is i ma using the same microcontroller in two different stages(not simultaneously)..but the programe is only one(nd compiler is only one)...so is it possible to use only ...Hi all,I am interfacing C8051F120 Silabs microcontroller for one of my application.Description of the Application: Data Acquisition and Controlling.16 bit ADC and DAC are connected to C8051F120 uC Via SPI.I need to acquire data from the Battery using ADC and Control the Battery(Charge/Discharge) using DAC.I am not seeing Clock out on SCK pin.(I have checked using Oscilloscope).Here is my Code.(The code is for ADC)#include---------------------------------------------------------------------- I'm developing a means for one SiLabs processor ('F340) to burn programs in another, C8051F120 ('F120), processor. Right now, all I am trying to do is begin with something simple: read location 0 of the F120 Main processor through JTAG. I am trying to use the SiLabs supplied functions running in an 'F340 processor, and I can read the F120's device code OK. But I cannot read any Flash location. The F120 runs it's program and I can see when the 'F340 runs the JTAG_Init, it successfully causes the F120 to stop running. The function JTAG_IREAD_FLASHDAT() returns the same thing ...I've 16-bit controller based on Infineon? C166 (jtag compatible) connected to fujisu 29v160T flash memory (non Jtag). Is there a free tools that interface Jtag port trought a PC parallel port and allows to program the flash memory? Thanks in advance.---------------------------------------------------------------------- Hi, As I want to create "rom checksum" for my code that will be loaded into bank0, bank1 and bank2. How to create this checksum for banked flash based code in C8051F120?? Please guide me, Thanking you, regards, pvc1879 IP: Logged vanmierlo Member posted November 26, 2010 08:17 AM ---------------------------------------------------------------------- Have a look at srecord.Hi, I am currently using the C8051F120 development kit (see attached) in attempt to sense the o/p voltage from my Buck convertor and adjust the PWM signal, which is also generated from the 8051 chip. However my question is how should I connect point A (see another attachment) and interface it with the development kit? I've read somewhere from the datasheet that there is an internal reference voltage of 1.2V and therefore I've stepped down the 28V output with a set of appropriate resistors (R1 amp R2). Assuming I would like to make about 30 samples before I made one adjustment to the PWM ...In order to prepare for my microprocessor systems class, I brought the C8051F120 microprocessor. So I found the SDCC list of bit registers and sfr (page 7), but the problem is that I cannot find the list of ISR's for the C8051F120. Can someone please tell me where I can find them? __________________ Cool Cap Engineer: Engineering By An Anime Nerdneed to know how to write data into external flash memory(offchip).using MCU MC9S12A128B and the external flash memory chip is M29F040B.Is there any special code to be sent to the external flash memory.Using a cpld chip number being CY37128P84 125 JC which is used for the selecting the external flash chip.Also using metrowerks code warrior and BDM Multilink. Thanks for any help, RanjitaHi, I am working with an application involving the ATMEGA8515 and need more data memory other than just the 8K on-chip available. Can some one please guide me on how to: 1). Select the correct part number for 64KB size Flash Memory IC (DIP type). 2). How to connect such external IC to the ATMEGA8515. I read some instructions and understand how to enable to full 64KB addressing space, however I am a bit confused regarding overall device connection. Thanks a lot and have a wonderful new 2010! Agustin Garcia --------------Please anybody can help how to interface LCD with C8051F120 Micro controllerHi, I have an Olimex kit, wich have a LPC2214 philips ARM7 chip, external flash MX26LV800BTC-55 (1M x 16 flash memory), and a external RAM of 256Kx32. The flash is mapped on the #CS0 line of ARM7 chip, and the RAM is on the #CS1. I'm using CrossStudio v1.4. I can access the internal flash of LPC2214 and debug ok using Macraigor Wiggler. But I don't know how to access directly to the external flash or the external RAM using the CrossStudio thought the JTAG (wiggler) emulator. Only found that I must ...---------------------------------------------------------------------- I wonder to know can 50MIPS or 100 MIPS of c8051F120 / C8051F130 able to process 80M sample rate of AD831 fast AD converter without using FIFO IC ???Hi, I have a board with an external flash (Atmel AT45FB321) connected to a AT91SAM7X256. That external flash has a SPI interface and it's connected to the SPI ports of the microcontroller. - Is it possible to program that flash through the microcontroller JTAG? - Does anyone have a OpenOCD script for the AT45DB321? I've made a quick search in google and I found that OpenOCD has commands for programming external flash but I'm clueless at the moment.---------------------------------------------------------------------- Hi, I am writing a bootloader using uvision2 for c8051F120. The purpose is to update my application code(hex.) through hyper terminal. I had referred to some guides, AN112 and AN201. Currently, I had modular my application codes -gt 5 files. I intend to place the bootloader and the hexfile receiver codes in one of my file(UART communication) so that I do not need to redefine some of the communication functions. My objective is to Erase the application codes in the hyper terminal and then load the new application codes (hex file) However, my doubt is, 1)How should I separate the bootloader ...Hi, I am new to LPC4330. I am using LPC4330 in my project and is in developing stage. I am using LPC4330 of 144 pin which doesnot contain any on-chip memory and am using M25P40 external SPI Flash device of ST Electronics for storing the application. I am also having a Keil ULINK2 JTAG through which I can download the application program into external SPI flash device. 1. I want to know the procedure for downloading the application program(.hex file) into M25P40 device using ULINK2 JTAG and mainly the settings for Keil IDE to download into M25P40 device and also the Memory regions ...So I bought myself an AVR Dragon because the features sounded useful however I am having trouble programming chips with it. I am using the JTAG on it and am trying to program a mega 32 chip. I can write to the EEPROM successfully and it verifies however it doesn't write correctly to the flash. I get this error message: Code: WARNING: FLASH byte address 0x0000 is 0xFF (should be 0x0C).. FAILED! And if I read back the flash the hex file looks all wrong. Memory addresses 0 to 8000 hex stay at FF. It can successfully erase the flash, if ...---------------------------------------------------------------------- I need to store a calibration factor in the scratchpad of the C8051F120. The documentation and examples I have located are quite helpful, but I am stuck with a syntax issue with the SDCC regarding initializing the pointers to the scratchpad. Per a Silicon Labs example: unsigned char code ip_address[4] _at_ 0x0000; char xdata* data ptr_ip_address = ampip_address; This syntax does not work with the SDCC. Per the SDCC documentation I have tried several things, including the equivalent of: code at 0x0000 unsigned char ip_address[4]; // Read xdata* char data ptr_ip_address = ampip_address; // Write The read pointer does not ...
