Startup power levels on cw305

hello, i’m trying to modify the vcc int levels of the cw305 upon connection with the cwlite. i understand that i can modify with target.vccint_set() but i want to initially connect the cw305 at a power level lower than 1.0 volts and step it upwards to see the effects of different vcc int values on my bitstream. right now when i connect it, the default vccint is 1.0 volts. how can i do this?

Is your goal to load the FPGA bitstream with a specific voltage?
You can connect to the CW305 without loading a bitstream:
target = cw.target(None, cw.targets.CW305, bsfile=None)

Then, you can set the desired voltage, disconnect, and re-connect with your desired bitstream:

target.vccint_set(0.95)
target.dis()
target = cw.target(...)

i see. my mistake, for some reason i thought the voltage would be reset to 1.0 volts every time the target is connected. thank you

The API doesn’t support it. Setting VCC and programming the bitfile are both handled by the CW305’s SAM3U; I don’t think it’s possible without customizing the SAM3U firmware.

if i were to modify the firmware source code, i’d have to run make again, correct? is there anything else to do to update changes?

Instructions are right here.

hello,

i attempted this code after running make again. it threw an error because my file path was wrong. after fixing it, i tried running it again, but still did not work.


# or CW305 target object
programmer = cw.SAMFWLoader(scope=target)
# WARNING: this will erase the firmware on the device
# and make it unusable until reprogrammed.
programmer.enter_bootloader(really_enter=True)

#Wait a moment for device to re-enumerate as USB-serial
programmer = cw.SAMFWLoader(scope=None)
programmer.program("com4", r"..\hardware\victims\cw305_artixtarget\fw\sam3u\CW305_SAM3U_FW\src\ChipWhisperer-CW305.bin")

i disconnected the scope and target from power and then reconnected. now the scope connects but the target will not. how do i fix this?

Try programming it again with the correct path! The comments in the code you pasted above tells you what happened: “this will erase the firmware on the device and make it unusable until reprogrammed.”

yes, i tried that! however, because i disconnected the scope and target, i cannot program again until the target connects.

Looks like you’ve programmed your CW305 with CW-lite firmware.
Disconnect the CW-lite, then follow the instructions here:

import chipwhisperer as cw
cw.program_sam_firmware(hardware_type='cw305')

This will program the stock CW305 firmware and get your CW305 back in business. Then you can try again to program your customized firmware.

it gives me this:

OSError: Could not find bootloader serial port, please see Updating Firmware — ChipWhisperer 5.7.0 documentation

but the website just says to make sure the device is plugged in. i completely unplugged the cwlite and now only have the cw305 attached to my computer. what am i doing wrong??

We’ve tried to cover all the possible scenarios on the page I linked; read through it, and try this.

hi,

i got this working. thank you for your help. i had another question.

i modified the firmware to mess with the vcc int settings. just tried to make the default vcc int level something other than 1.0. i did so in the code, and on the board the 7 segment display shows 820 (for 0.82 V) which is what i wanted. however, in jupyter notebooks when i call target.vccint_get(), it returns 1.0. what is the right value for vcc int here?

vccint_get() is just reading the vccint_setting variable from naeusb_fpga_target.c, so I’d start there. What might’ve happened is that you set voltage correctly, but didn’t update vccint_setting.

yeah that was exactly it. thanks. just to confirm- the LEDs are the true value?

Yup, that’s right. IIRC there’s another microcontroller on the board acting as a voltmeter.

1 Like

ctrl_progfpga_bulk() does the setup, while main_vendor_bulk_out_received() does the actual transfer.

How are you trying to change it? Setting vccint is done over I2C, so there shouldn’t be any issue with doing that at the same time as writing to the FPGA.

i’ve been setting tps56520_set(900) (or some other value).

Oh sorry, that changed a while back actually. The function you want is fpga_prog_bulk_out_received() in fpga_program.c.