Preheat oven to 180°C or 160°C fan. Grease and line base and sides of a deep 23cm square cake pan. Ensure baking paper extends 2cm above rim of pan.
Make almond topping by combining flour and sugar with a pinch of salt in a small bowl. Rub in butter with fingertips. Mix through almonds and set aside.
Using an electric beater, cream butter and beat in sugar and vanilla extract until pale and creamy. Add eggs, one at a time, beating well after each addition. Gently fold in both flours, ground almonds and a pinch of salt. Spread mixture into prepared pan and top with raspberries.
Sprinkle almond topping over raspberries. Bake for 1 hour, until a skewer inserted comes out clean. Cool in pan for 5 minutes, then use paper to lift out onto a wire rack to cool completely.