How do I put RED-V RedBoard's FE310-G002 to sleep?

I’m having trouble placing the FE310-G002 on the RED-V RedBoard into “Sleep Mode.” Are there any C-code examples on how to do this? All I see from the data sheet is that the pmukey address needs to be set to 0x51f15E, and then after any value is written to the pmusleep address, the PMU sleep sequence will begin. I was expecting to see a large drop in current consumption, but that doesn’t seem to be happening. Is there anything else I could be missing? Any help is appreciated.

Thanks!

Go through pages 33 and 68 here https://cdn.sparkfun.com/assets/7/f/0/2 … v19p05.pdf which detail how it works and how to initiate

so it should be as simple this?:

*((volatile uint32_t *)(METAL_SIFIVE_AON0_0_BASE_ADDRESS + METAL_SIFIVE_AON0_PMUKEY)) = 0x51F15E;
*((volatile uint32_t *)(METAL_SIFIVE_AON0_0_BASE_ADDRESS + METAL_SIFIVE_AON0_PMUSLEEP)) = 0x01;

Is there a way to tell that it actually worked and the sleep sequence executed?

Easiest way is to use a power meter and see it change; we sell this one https://www.sparkfun.com/products/15571 but you could also use a standard multimeter