Dear Håkon Alseth,
you posted twi source code which took care of all SD/PPI stuff here and it was also linked here , but it is no longer available. The whole forum seams to be broken. Could you please upload a example fpr twi hw master with enabled sd to your github page? Thanks in advance.
Regards, Marius