Can you please get the exact packet sent. Is it in correct format.
packet = 0x01; // Start
packet = 0x39; //Program row command
packet = 0x1F; // Data Length lsb (28 bytes of data + 2 bytes of flash row number + 1 byte of flash array ID)
packet = 0x00; // data length msb
packet = 0x00;// flash array ID
packet = 0x27; // starting row in flash array lsb
packet = 0x00; // starting row in flash array msb
packet[7- 33] = data from cyacd file converted from ASCII to hex
packet = checksum lsb 0xF9 (0xFFFF - (0x7F + the checksum summation for bytes 7-33))
packet = checksum msb 0xF8
packet = 0x17
The values for bytes 7-33 are ( the values are the decimal equivalent of what is contained in the byte array)
My specific error code is
1 3 0 0 252(FC) 255(FF) 23(0x17)
Can you verify the number bytes being actually send. - is actually 27 bytes as per my understanding. Please correct me if I'm wrong.
I was only sending 27 bytes of data in the final packet, but even with the updated data length value of 1E(27+3 bytes) I still receive the same error. Please respond as soon as you are able.
Can you do the following step.
1)Run the Bootloader project in debug mode.
2)Place a break point inside the section "case Bootloader_1_COMMAND_PROGRAM:" in the Bootloader.c file (Bootloader_HostLink())
3)Now you can check the variable "packetBuffer" and check if the PSoC has received the packet exactly as you sent.
Unfortunately I am not using the code created by cypress and instead using my own c# custom boot loading application. If I continue to have problems with my own code I may need to switch over to what is provided, but for now I wish to continue with my own. Do you believe that the issue maybe bytes being lost during the transit from host to device? If that is the case wouldn't I receive a different error message? The most puzzling issue is that I don't receive any error message while the row data is being sent to the device but only when I send the program row command. Hopefully this info helps you with what the issue may be.
Additional question: Does the format of the data sent to the psoc need to be in hex? For example say you have the value 00 in the cyacd file, should the value that gets passed to the psoc 0x00 or 3030? This might be what is causing the issue but I am unsure.
Do you mean to say that you are not using Bootloader component?
If you are using Bootloader component the data needs to be in hex as mentioned in the Bootloader documentation.
Sorry for the confusion , I did manage to put a breakpoint on packetBuffer and it did match up with the values what I sent the device. What would suggest my next step be?
I hope the issue is resolved. I'm just posting the summary of the solution.
"The issue stemmed from the ECC data and whether or not to include. Once I added those last bytes, the Psoc responded as intended. "