Thank you Carlos, Fang and Mark,
Your suggestions helped a lot. I implemented the code suggested by Carlos and I found that the priority for the PendSV call is set differently for the K64. I used the following:
NVIC_SetPriority(PendSV_IRQn, 0xF); // Set PendSV to lowest possible priority
It works great!
Thanks!
Luis