It all works now! Reduced the peripheral clock speed to 36MHz and delt with the stupidness related to it. Initialized the structure to 0s to fix pid init.