The heavy-handedness from Madrid was all too expected. Spain's in a bad way right now, corruption is rife (especially government corruption), the government is barely hanging onto it's mandate (how many election attempts did it take this time - three?), and now with a serious threat to the nation's political unity the government took the course of action that comes most naturally to it - heavy handed coercion/policing.
Spain is a young democracy and although the law and principle of democracy are in place, the heart is not. A massive change is needed in Madrid, and through Spain. Is that a problem the EU can solve? Doubtful. And they don't want nationalism and separation anyway. Is it a problem the current Spanish government want to solve? No.
In Spain, on a large scale and on many fronts the oppression is palpable. Catalonian independence is just one of those fronts.