PSoC™ 5, 3 & 1 Forum Discussions
Hi,
Here is an example project to store config data in flash that is separate from the application data.
You have to use the "Manual application image placement" option in the bootloadable component, and give an address that starts at "End Address of Bootloader project + Required User code area in flash" rounded off to the nearest 256 byte address. With this method, you can use the flash region between the bootloader project and the application project for storing the user data.
This user array in flash cannot be assigned an absolute address since bootloadable projects do not allow absolute address placement. So, you have to write to this flash location with hardcoded defines in the application project for these flash row numbers.
There are few points to consider:
1.) Your bootloader project code region should not encroach in to the user area region. So, you have to freeze your bootloader project hex, get its code size, give some headroom of 1 flash row just in case, and then start the user flash area.
2.) The other thing is that since you are doing a backdoor write to the user flash area which the linker has not allocated - so you protect the bootloader from being written accidentally ever by protecting its flash region (W setting). And also ensure that the application code is never updated by ensuring the flash write functions have a check on the flash row range such that it is always below the application start address.
An example is given below.
1) First build the bootloader project.Assume it takes 6414 bytes. 6414/256 = 26 rows.
So 0x1A is the last bootloader row.
2) Give a margin of one row. So the configuration data in flash can start from 0X1C.
Give macros in bootloadable to write to specific rows 1C, 1D and 1E.
3) Place the bootloadable at 0x2000(row# 0x20) in flash using 'Manual application image placement'.
The flash content can be read back using programmer, after bootloading to verify.
Hi,
I often find the variable inspector shows 0 values. However, immediately after inspection I printf the values and they are not 0. I can't trust the inspector during breakpoint inspection.
In the attached image, The accel and gyro structures are not in fact all zeros and immediately after the breakpoint they are printed without modification and the output is valid numbers.
The acell/gyro structures contain a union of shorts, raw[3] and {roll,pitch,yaw}, I.e. I can view the roll/pitch/yaw as individual members or as a combined array. Could the union be throwing off the Inspector?
C
Show LessThis example project can be used to calculate the maximum throughput using the Streamer Application.
It also details as comments, the use and significance of every function in the firmware. So one can use it to build and understand the concepts of USB APIs.
The C# and C++ based applications are also archieved and attached.
It can be used to test and check the throughput.
Is there any way to read the Program Counter value of a particular point in my code? I want to store this value in a varaiable and process it. (specifically for PSoC3).
Show LessThis example project can be used to calculate the maximum throughput using the Streamer Application.
It also details as comments, the use and significance of every function in the firmware. So one can use it to build and understand the concepts of USB APIs.
The C# and C++ based applications are also archieved and attached.
It can be used to test and check the throughput.
The attached example project can be used as a reference to understand and get started with the USBFS APIs in PSoC. It contains the comments which details the use and significance of each API being used.
This project can be used with the Streamer application that is provided by Cypress along with Cypress SuiteUSB to find the throughput of the USBFS firmware.
Cheers.!!!
Show LessHi
I have problems finding “the New License ID Code input field in the µVision License Manager Dialog — Single-User License Tab (available from the File Menu).”
Show Less