Red Coins in the Cannon
From the Super Mario Wiki
Re-entering the cannon's course after clearing it once will allow the player to use F.L.U.D.D. and do a Red Coin challenge. Ground Pounding the Red Coin Switch will cause eight Red Coins to appear around the course, and the player needs to collect them all within a time limit of a minute. Failing to collect them all within the time limit will result in Mario losing a life. Six Red Coins are placed over the green disappearing platforms, and the other two are placed over the first set of red platforms. Collecting all eight Red Coins will cause the Shine Sprite to appear on the platform after the first set of red disappearing platforms.