Is there any guides you followed? Seems a bit of a mine field from a quick Google. I couldn't move mine from xmp settings without getting crashes in games so gave up. Hours of testing after changing each setting with no stability wore me down
Drop tRFC to about 300
Increase tREFI to 65535
These two should be stable and will give you a noticeable latency and throghput boost, what they do is control how often ddr4 needs to refresh its bits, if they not refreshed then they bit flip and you get of course corruption.
Now basically the hotter ram runs at the more often it needs to be refreshed, so if your ram runs hot, you need to be conservative on these values, if they run cool you more likely to get away with more aggressive values.
So the issue with this is e.g. you might be stable on christmas day, but in the middle of a heatwave in july suddenly you getting blue screens due to the ram been hotter and the infrequent refresh not been good enough.
If you increasing your dram voltage which in turn makes dimms run hotter this will also potentially affect this.
After adjusting this do a 2 hour run of HCI and a 2 hour run of karhu ram tester. This will likely heat up the ram more then you will see in gaming, every day loads etc. If its ok, you should be good, but perhaps wise to check again in the summer.
If its unstable or you just paranoid then reduce tREFI, for my ram a value of about 11k is JEDEC spec for 3000mhz (the value depends on the clock speed of ram), doubling it over jedec space should be pretty safe, if you dont want to risk 65535.
For other ram timings ude the ryzen memory calculator, try it on the middle setting, and see how you get on with that, if its unstable revert to safe. Tuning tREFi and tRFC in my opinion is much easier than CAS etc.
Primary timings primarily are dependent on quality of ram and ram voltage. IMC voltage and quality may have a small affect. B die is probably safe for 24/7 usage up to about 1.45v when passively cooled even with maxed out tREFI.
Secondary timings apart from tRFC will have very limited impact on throughput but can help latency and can help make tuned primary timings stable when they otherwise wouldnt be, these tend to be set by the board manufacturer and not affected by XMP.
Third timings, can have a noticeable affect on throughput performance, especially tREFI, and these seem affected by IMC voltage more than any other timings. They effectively manipulate how efficient ram is at its clockspeed for throughput e.g. they can make 3000mhz ram faster than 3200mhz ram. The people who helped me indicate its motherboard quality and IMC voltage that primarily affects how tight these can go.
For me even on intel I used ryzen calculator, as a guide, someone helped me on reddit, and also I looked at timings posted by other overclockers, as close as possible to the clock speed of my ram and used those as a baseline.
Some people have got paranoid about how high tREFI as it caused them e.g. to have HCI runs fail overnight, but the heat generated by HCI is way in excess of normal system load. So whilst I cannot say for sure it be safe, I reckon it should be. The tREFI+TRFC combo has a bigger impact than primary timings. Also those guys with the failures were already pushing ram to extreme levels such as 4000CL14 1.5+v.
I will post a screenshot of my intel timings but this is intel, however about 70% of the timings were taken from the ryzen calculator so wouldnt be too different.
On my 2600X, I have hynix A die spec'd for 3000CL16, its stable at both 3000CL14 and 3200CL16 using the help of ryzen memory calculator, I ended up using 3000CL14 as it has better latency over 3200CL16.
Also to correct my earlier post its going from 14-14-14-31 to 12-13-13-28 on primaries.
One of the reasons I want to switch my main rig to ryzen is the community is so much better, getting people to help me on intel was really hard, it seems that community only has extreme overclockers and no one else, whilst reddit ryzen users are providing a bunch of help to each other and of course we have the amd calculators.
Also on ryzen use CR1 not CR2. Disable geardown.