Question: When a project has been upgraded to PSoC Designer 5.1, the CSD2X User Module (for CY8C22x45 or CY8C21x45 PSoC devices) does not work as it used to work in PSoC Designer 5.0. What has been changed from PSoC Designer 5.0 to PSoC Designer 5.1 for this user module? What should be done to make it work?
Response: With PSoC Designer 5.1, there is a new version (v2.0) of the CSD2X User Module (UM) for CY8C21x45 and CY8C22x45 PSoC devices only. The new version of this UM has the following new or improved features.
- Ability to change most scan settings at run-time (new API functions have been added to do this). This enables easy and flexible CapSense tuning to be done.
- Ability to gang multiple sensors together to scan them at the same time with unique scan settings.
- The resolution of the Reference scan setting has been improved. Now 5-bit reference resolution is available when the UM is placed in analog columns 2 and/or 3 and 4-bit reference resolution is available when the UM is placed in analog columns 0 and/or 1. Previously, only 3-bit resolution was available for the Reference setting.
The new version (v2.0) of this UM is not backwards compatible with previous versions of this UM. Therefore, the following should be done:
If you have existing PSoC Designer 5.0 projects that contain the CSD2X v1.x UM:
It is recommended that you do not open and/or use these projects with PSoC Designer 5.1. Instead, you should continue to open and/or use these projects with PSoC Designer 5.0. (PSoC Designer 5.0 will coexist on a computer with PSoC Designer 5.1.) So, you can continue to use your previous projects that contain theCSD2X v1.x UM with PSoC Designer 5.0. In this case, the CSD2X UM in these existing projects will not be upgraded to version 2.0.
If you are starting a new project that will contain a CSD2X UM:
It is highly recommended that you start a new project with PSoC Designer 5.1. In this case, any CSD2X UM that you add to your project will be the new 2.0 version. You will be able to take full advantage of the new and improved features of the 2.0 version of the UM.
If you need to upgrade a CSD2X UM to version 2.0:
In some cases, you may desire to migrate an existing project to PSoC Designer 5.1 or upgrade an existing CSD2X UM to version 2.0. In either case, any CSD2X UM will have its version upgraded to 2.0. In this case, it is highly unlikely that the project will continue to function as it did before. The following things will happen in this case that will break backwards compatibility.
- The UM wizard and UM properties no longer have the option to define unique scan settings for each sensor. Instead, initial scan settings are set with UM properties. All sensors will be scanned with these same scan settings unless the scan settings are changed at run-time in user application code. All scan settings that were previously defined for each sensor in the UM wizard will be lost and any scan settings that were previously defined in the UM properties may be reset to their default values.
- All Reference values for the UM are now in the range of 0 to 31 (they were previously in the range of 0 to 7). This means there is a better resolution for the Reference values of the UM. So, this means that if a previous Reference value was defined for the UM, the same value now has a different meaning. For example, if the value 2 was previously defined as a Reference value, it would have given a reference that is 3/8 of full-scale. Now, the same reference value of 2 would give a reference that is 3/32 of the full-scale.
If your project no longer works as desired after upgrading a CSD2X UM to version 2.0, this is what you should do to restore the proper functionality of your project.
- Go through each setting for the UM and ensure that it is proper. You may need to modify UM settings to restore desired settings. Pay particular attention to the reference value settings, since these values are now on a different scale.
- If you need any sensors to have unique scan settings, then you must modify your application code to change the scan settings before scanning the affected sensors. So, unique scan settings for each sensor can now only be implemented by modifying the scan settings at run-time with user application code. New API functions have been provided to implement this.
- It may be necessary to re-tune the sensors.