SD card issues on Matek F405 CTR

I’m trying to use an SD card for terrain data and DF logging, but from the pre-arm messages I’m getting, it seems like it’s not working out. I get “waiting for terrain data” and “logging failed”. My SD card is formatted as FAT32 as Matek recommends.

I have tested with iNav firmware on this board and it can recognize the SD card and use it for logging just fine. So this seems like an Ardupilot issue.

Firmware: Arducopter 4.0.3
FC: Matek F405-CTR
SD card: Sandisk Ultra 16GB A1

I have the same problem with my Matek F405-WTE, it won’t log with Sandisk Ultra 32GB A1. However with a Samsung EVO card everything just work well. Maybe Sandisk is using some protocol that is too advanced for the old F4 arm boards.