You could have run aground but I'd bet it was aircraft. I use TMO so it might be a bit different.
I use a high TC to get across the Pacific but once in enemy territory I'm a bit more careful about using it, for example;
If my air search radar gives me a contact but the aircraft hasn't been spotted I won't use more than 64 TC because at 64 or less your crew will give you an "aircraft spotted" warning but higher than 64 they won't and you'll get attacked without any warning and it'll be too late as everything happens much too fast and you're basically toast.
At periscope depth TMO aircraft can still "see" you so same applies as above.
As mentioned though, check your chart (zoom right in) as sometimes there's little atolls or something shallow that you don't see.